Skip to content

Promote dev: #367 core follow-ups + nightly CI hardening - #383

Merged
AminDhouib merged 9 commits into
masterfrom
dev
Sep 9, 2026
Merged

Promote dev: #367 core follow-ups + nightly CI hardening#383
AminDhouib merged 9 commits into
masterfrom
dev

Conversation

@AminDhouib

Copy link
Copy Markdown
Member

Promotes two PRs already merged to dev, both with green rollups.

#381 — issue #367 follow-ups (core)

  • Proxy/CDN HTML error pages no longer replace the presign status line. parseErrorBody's text fallback was surfacing 200 characters of raw nginx/Cloudflare HTML in error.message where callers used to get Presign request failed: 502 Bad Gateway.
  • The presign error now gets its final message at construction instead of being reassigned afterwards, which also drops a redundant second parseErrorBody call.
  • isAnimatedImage sniffs a 64 KiB prefix (enough for APNG acTL, WebP VP8X/ANIM, and the GIF NETSCAPE2.0 short-circuit) instead of materialising the whole file, falling back to a full read only for the multi-descriptor GIF walk.

Each fix was driven from a failing test first. Issue #367 items 2, 4 and 6 stay open — they need a public-API/i18n decision, not a bug fix.

Note on item 3: the issue claimed the reassigned message left a stale .stack header. V8 formats .stack lazily, so that symptom was never observable; the refactor landed on its own merits (one parse, no mutation of a constructed error) rather than as a bug fix.

#382 — nightly CI hardening

  • All four playwright install --with-deps chromium steps now drop Google's chrome-stable apt source first. --with-deps runs apt-get update, which on the runner image also refreshes that repo; its index served a broken Packages.gz (Hash Sum mismatch) and failed the whole install with exit 100 across three jobs and both attempts of nightly run 34382957429, while every Ubuntu archive source fetched fine. Playwright ships its own Chromium and takes system deps from the Ubuntu archives, so the repo is dead weight here. The failure is intermittent, not a permanent outage.
  • The landing suite's listen port moves 53080 → 31080, out of Linux's ephemeral source-port range (32768–60999).

The six cross-framework storybook ports (53050–53055) and the cf harness (53060) are deliberately NOT moved: they are hand-registered as authorized JavaScript origins / redirect URIs in four OAuth provider consoles, so renumbering them silently breaks local drive popups.

Attempt 1 of that nightly run also lost the cross-framework suite to a silent 900 s webServer timeout. That is unexplained, not fixed here — candidates are an ephemeral-port collision or six cold storybook compiles exceeding the budget on a loaded runner. It did not reproduce (#381's run passed the same suite green). If it recurs, the next step is diagnostic before structural: log the ports actually bound and each storybook's own ready line.

chore: sync dev with master after the #379 promotion
…error page

parseErrorBody's text fallback surfaces the first 200 characters of any
unrecognised body, so an nginx/Cloudflare 502 or 413 HTML page reached
onError as raw markup where the strategy used to throw the clean
"Presign request failed: 502 Bad Gateway".

Markup with no error code is not the endpoint's copy: fall back to the
legacy wording for it. An S3-style <Error><Code> body opens with a tag
too and still gets through, because it parses to a real code.

Refs #367 (item 1)
The strategy built the error, then reassigned error.message when the
body had nothing to surface — so the body was parsed twice and the
error carried a message it never kept.

uploadErrorFromResponse now decides the message itself: fallbackMessage
supplies wording a caller must keep, and ignoreErrorPageBody folds in
the guard from the previous commit. token-endpoint is one call with one
parse and no post-construction patching; the error-page guard moves with
it. Callers that pass neither option are unaffected.

Refs #367 (item 3)
…file

The animated-image guard runs before compress and exif, so every image
paid a full file.arrayBuffer() for it — a read the main-thread path
never made before the guard existed, and a still 40 MB photo pays it to
learn nothing.

Read the first 64 KiB instead: APNG's acTL precedes the first IDAT,
WebP's VP8X/ANIM open the container, and a looping GIF's NETSCAPE2.0
extension sits in the header. Only a GIF that has announced nothing by
then still needs the full read, because its second Image Descriptor can
sit anywhere in the stream.

Refs #367 (item 5)
…ywright

Every Playwright job in the repo — PR checks included — dies before it
runs a test:

  Err:29 https://dl.google.com/linux/chrome-stable/deb stable/main amd64 Packages
    Hash Sum mismatch
  E: Failed to fetch .../binary-amd64/Packages.gz  Hash Sum mismatch
  Failed to install browsers
  Error: Installation process exited with code: 100

Nightly run 34382957429 on master, attempts 1 and 2, three separate jobs.
Every Ubuntu archive source fetched fine; only Google's chrome-stable
index is broken, and `playwright install --with-deps` runs apt-get update
across all of them, so one bad third-party repo fails the step.

Playwright downloads its own Chromium and takes system deps from the
Ubuntu archives — it never needs that repo — so remove the source list
before installing rather than retrying against a broken mirror. Applied
to all four install steps (e2e.yml E2E + Docs-E2E, nightly.yml E2E-Full +
Landing-Feedback, whose creds guard is kept).
…range

Same class as the 53061/53062 fix: Linux draws ephemeral source ports
from 32768-60999, so :53080 — the landing suite's fixed webServer port —
can be transiently held by one of the runner's own outbound connections,
and Playwright then just polls a URL that never comes up.

53080 -> 31080, and the rule is recorded beside the constant. It appears
in exactly one tracked file, so this is the whole sweep for that port.

The six storybook ports (53050-53055) and the cross-framework harness
(:53060) are deliberately NOT moved here: those origins are registered
in the four cloud-drive providers' developer consoles (each storybook's
.env.example, local-dev/.env.ports), so renumbering them is an external
service-config change, not a repo change.
…wups

fix(core): #367 follow-ups — proxy error pages, message-at-construction, prefix animation sniff
fix(ci): unblock the Playwright install and move the landing suite's port out of the ephemeral range
@codesandbox

codesandbox Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@AminDhouib
AminDhouib merged commit 9804695 into master Sep 9, 2026
22 checks passed
AminDhouib added a commit that referenced this pull request Sep 9, 2026
Sync dev with master after the #383 promotion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant