Page MenuHomePhabricator

When evaluator fails due to WASI unavailability, consider queuing the runner back to the executor pool
Closed, ResolvedPublic

Description

Description

This way, instead of throwing away runners that aren't yet ready, we can give the runners more time to warm up. This requires some careful management in the Executor, Evaluator, and ExecutorPool classes: currently, all of our code assumes that an Executor is one-and-done, i.e. that there is a 1:1 relationship between evaluation calls and WASI runners, and that a new evaluation event always gets an Executor that's in a ready state.

Perhaps the HEARTBEAT signal can be read unconditionally at the start of evaluation (i.e., the executor sends it automatically when it's ready, rather than waiting for stdin). The state change from AWAITING_HEARTBEAT to EMPTY can happen in the background. The ExecutorPool can simply re-queue any Executor that isn't in the desired state. That way, at call time, there will be no need to think about that state change. In this case, we'd time out not during execute(), but when trying to acquire the runner from the ExecutorPool.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • think about it
  • maybe make a Phab task to do it, and then do it

Remove all the non-applicable tags from the "Tags" field, leave only the tags of the projects/repositories related to this task


Completion checklist

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Add a heartbeat to the executor to fail early when executors are unavailable.repos/abstract-wiki/wikifunctions/function-evaluator!433apineapine-wasi-failmain
Customize query in GitLab

Event Timeline

cmassaro claimed this task.
cmassaro updated the task description. (Show Details)
cmassaro updated the task description. (Show Details)

Change #1204582 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2025-11-05-063501 to 2025-11-12-122736

https://gerrit.wikimedia.org/r/1204582

Change #1204582 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2025-11-05-063501 to 2025-11-12-122736

https://gerrit.wikimedia.org/r/1204582

Change #1211872 had a related patch set uploaded (by Cory Massaro; author: Cory Massaro):

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2025-11-12-122736 to 2025-11-17-175029

https://gerrit.wikimedia.org/r/1211872