Repository navigation
Inline images: give a slow sandbox image load a bounded grace and say why it timed out - #16923
Conversation
… why it timed out Firefox on windows-latest has timed out the first non-Latin filename check at the 5 s load wait twice today while every other browser and filename passed. A slow load may now borrow up to 10 s from a 30 s grace shared by the run, so a run where every load fails still reports before the harness stops waiting, and a timeout names the image state (missing, still loading, or wrong size).
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5dfba66894
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const start = performance.now(); | ||
| await until( | ||
| () => image()?.complete && image()?.naturalWidth === width, | ||
| 5000 + Math.max(0, Math.min(loadGraceMs, 10000)), |
There was a problem hiding this comment.
Bound the grace against the full suite's report deadline
When a regression causes sandbox images to remain missing or have the wrong dimensions, the shared grace still allows the suite to exceed the harness deadline. With all seven configured codecs supported, there are 35 reachable loaded() waits even when the scope-switch check stops on its first failure: their base timeouts consume 175 seconds, and this grace adds another 30 seconds before other checks and overhead. However, tests/studio/playwright_inline_images.py waits only 180 seconds for #report[data-complete="true"], so it closes the browser before finish() and loses all per-check results, including the new diagnostics. Budget the extra waiting against an overall deadline, or adjust the harness deadline to accommodate the actual worst-case run.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Right that the comment overclaimed: with every codec supported and every load failing, the 5 s base alone (35 x 5 s) is already past the harness's 180 s report wait, so no grace size can promise a report there, and the "Browser simulations" step's 5 minute limit ends that case either way. The grace does not cause that, but it should not make it worse by much, so in abb82a1 the shared grace is 15 s instead of 30 s and the comment now says what it bounds: one slow load is still covered, and one browser adds at most 15 s to a step that takes about 90 s for all five browsers when healthy. Chromium and Firefox still pass 59 of 59 locally.
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Inline images (windows-latest)failed twice today on unrelated PRs (#16921, and thefix/webkitgtk-long-thread-scrollingbranch), both times on the same check and only in Firefox:Chromium, WebKit, Chrome and Edge passed in the same job, the other 58 Firefox checks passed (
café.pngright before it,100%.pngright after it), and other runs of the same workflow pass the check. So it is a slow load on that runner rather than a wrong URL, which would fail every run.loaded()gives each sandbox image 5 s and the timeout message said nothing about what state the image was in, so the logs cannot tell a missing image from a slow one or a wrong one.Change
tests/studio/fixtures/inline-image-client.js, test only:loaded()keeps its 5 s per load, and a load that runs over may borrow up to 10 s more from a 15 s grace shared by the whole run. One slow load is covered; one browser adds at most 15 s, so the five-browser step (about 90 s when healthy, measured on runInline imagestoday: 72 to 88 s) stays far inside its 5 minute limit. A flat longer timeout would not do: with every load failing, 15 s per load runs past the harness's 180 s wait for the report (measured below), so a real breakage would lose the per-check report entirely.until()now appends the image state:(no image), orcomplete,naturalWidthand the start ofcurrentSrc.Nothing else in the checks changes, and the other
until()callers keep the old 5 s and message.Testing
tests/studio/playwright_inline_images.py --browsers chromium firefoxon Linux, from a cleannpm ci:Condition timed out (complete=true naturalWidth=32 src=blob:...)What this cannot prove here: the Windows Firefox slowness itself, which this machine cannot reproduce. If it persists past 15 s, the next failure will at least name the image state.