Page MenuHomePhabricator

Implement per-request timeout / resource consumption limits in the evaluator
Closed, ResolvedPublic

Description

Description

Ensure that evaluator processes die when their time is up

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

  • evaluator processes are given a timeout and end themselves with dignity when the timeout is reached

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


Completion checklist

Event Timeline

Notes from task review meeting: Needs to be done before launch. Hard-coded (or config variable) 15sec (or whatever) value in the code with a setTimeout() call/etc. in the outer node evaluator (not the Python/JS executor) and return a timeout error instead of output.

James's estimated effort: 0.5 day (if whoever picks this up thinks that will take considerably longer, please check whether we agree on the task)

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

[mediawiki/services/function-evaluator@master] Adds 15-second timeout to the evaluator.

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

Change 869289 had a related patch set uploaded (by Jforrester; author: Cory Massaro):

[mediawiki/extensions/WikiLambda@master] ApiFunctionCall: Add example function call that times out

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

Change 869290 merged by jenkins-bot:

[mediawiki/services/function-evaluator@master] Add 15-second timeout to the evaluator.

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

Jdforrester-WMF subscribed.

Done. Note that we'll need to pass around the remaining timeout for clean re-entrant behaviour, but that's captured in another, post-launch ticket.

Change 869289 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ApiFunctionCall: Add example function call that times out

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