Page MenuHomePhabricator

WikiLambda: Test runs sometimes get stuck showing "Running"
Closed, ResolvedPublicBUG REPORT

Description

Description

When there's a function page with a substantial number of implementation/test combinations, and they are all triggered to run at the same time, sometimes the page never refreshes to show that the runs completed. Rather, the page gets stuck showing "Running" for all of the test runs.

Steps to reproduce:

  1. Go to a function page having a substantial number of implementation/test combinations, such as https://www.wikifunctions.org/view/en/Z13522.
  2. Make a trivial edit to a label or description field, so as to invalidate the previously saved test results for the function. Publish the edit.
  3. Observe that "Running" displays for all the tests, but doesn't go away for a long time (as far as I can tell it never goes away).
  4. However, if you refresh the page, the "Running" indicators will change appropriately to "Passed" and "Failed" indicators. (At least, that's what I observe most often.) Also, if you check the metadata dialogues, they indicate that the test runs were completed normally.

Observed behavior:

  • As described above.

Expected behavior (Acceptance criteria):

  • It should not be necessary to refresh the page in order to see the results indicators.

Completion checklist

Event Timeline

What I do see is we are hitting the concurrency limit here.

POST https://www.wikifunctions.org/w/api.php 429 (Too Many Requests)
You have too many function calls executing right now.

The more general error (now) ends with something like:

"Z507K2": { "Z1K1": "Z5", "Z5K1": "Z500", "Z5K2": { "Z1K1": { "Z1K1": "Z7", "Z7K1": "Z885", "Z885K1": "Z500" }, "Z500K1": "Call tuples failed in returnOnFirstError. Error: FetchError: invalid json response body at http://localhost:6501/w/api.php?action=wikilambda_fetch&format=json&uselang=content&zids=Z15912 reason: Unexpected token 'u', \"upstream c\"... is not valid JSON." } } } }

See https://www.wikifunctions.org/view/en/Z13523, for example and contrast https://www.wikifunctions.org/wiki/Z13523?action=edit&uselang=en

The cryptic error Unexpected token 'u', \"upstream c\"... is not valid JSON is because the HTTP fetch resulted in the string "upstream connect error", and our JSON parser throws on that.

I think this should be more stable now ? can we close this specific issue?

Yes, the behaviour is different now.

Jdforrester-WMF claimed this task.
Jdforrester-WMF subscribed.

Let's call this Resolved.