Page MenuHomePhabricator

routes: De-duplicate code in callback.js and evaluate-transpiled.js
Closed, ResolvedPublic

Description

Description

routes/callback.js has been created by tweaking a copy of evaluate-transpiled.js. Once the MR has finished review/refinement, we should factor out the common code.

While at it, let's also check the other endpoint code files for Eliminable duplication.

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

  • No change in behavior of these endpoints; just more maintainable code.

Completion checklist

Event Timeline

I recommend triaging this as high priority. The possibility of dangerous code rot here is enormous. Really, we should have done the abstraction of the startup code BEFORE implementing callback.js, but the ship is sailing on that.

Jdforrester-WMF changed the task status from In Progress to Open.Jul 16 2026, 7:48 AM

First part done; next part needs the main MR to land first.

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

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-07-14-211423 to 2026-07-21-162301

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

Change #1313942 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-07-14-211423 to 2026-07-21-162301

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

DMartin-WMF changed the task status from Open to In Progress.Aug 4 2026, 6:40 AM
DMartin-WMF claimed this task.
DMartin-WMF added a subscriber: Jdforrester-WMF.

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

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-07-29-180129 to 2026-08-04-203437

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

Change #1321557 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-07-29-180129 to 2026-08-04-203437

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