Skip to content

Name the encoding on two more diffusion.py reads in test_diffusion_zimage_cfg_split - #15040

Merged
danielhanchen merged 1 commit into
mainfrom
ci-zimage-read-encoding-2
Oct 23, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-zimage-read-encoding-2

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

tests/test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding fails on main again, for example in Repo tests (CPU, rest) on #15033:

studio/backend/tests/test_diffusion_zimage_cfg_split.py:551: read_text()
studio/backend/tests/test_diffusion_zimage_cfg_split.py:748: read_text()

#14955 added two more reads of diffusion.py with the platform default encoding to the same test file #15003 fixed earlier. Both now pass encoding = "utf-8".

Verification

  • On main: -k checked_in_file_reads gives 1 failed, 15 passed.
  • On this branch: 16 passed.
  • studio/backend/tests/test_diffusion_zimage_cfg_split.py: 35 passed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T22:55:24.080258Z 07533ac Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 07533ac858

ℹ️ 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".

@danielhanchen
danielhanchen merged commit 66dfb16 into main Oct 23, 2026
0 of 31 checks passed
@danielhanchen
danielhanchen deleted the ci-zimage-read-encoding-2 branch October 23, 2026 23:06
danielhanchen added a commit that referenced this pull request Oct 26, 2026
…apt steps (#15350)

## Why apt steps started timing out

Since about Oct 22, `azure.archive.ubuntu.com` on GitHub-hosted Ubuntu
runners has been serving some runners at a few tens of KB/s for hours at
a time (actions/runner-images#14823, #15040). The images send apt
through `mirror+file:/etc/apt/apt-mirrors.txt` with the Azure mirror
first, and apt only fails over to the next entry on an error. A slow
transfer is still a live transfer, so `Acquire::http::Timeout` never
fires and every retry in `retry-with-apt-lock.sh` downloads from the
same slow node.

That is what killed the Tauri smoke build on staging: the 55 MB
WebKitGTK install fetched at roughly 35 KB/s, both 360 s attempts were
cut off, and the 15 minute step limit ended the job. A timed-out attempt
also left its `apt-get` running under `sudo`, still holding the dpkg
lock, so the second attempt opened with `Could not get lock
/var/lib/dpkg/lock-frontend`.

## Fix

All in `.github/scripts/retry-with-apt-lock.sh`, so every workflow that
already goes through the helper picks it up:

- Once per job, each mirror in `apt-mirrors.txt` is timed on a 5 s fetch
of `dists/<codename>/main/binary-<arch>/Packages.gz`, and the file is
rewritten fastest first. `http://archive.ubuntu.com/ubuntu/` is added as
a candidate beside an `*.archive.ubuntu.com` mirror; `ports.ubuntu.com`
(arm64) is left alone. A healthy Azure mirror stays first, since it is
normally the fastest.
- After a failed attempt the leading mirror is moved last, so the retry
goes somewhere else.
- After a timed-out attempt, leftover `apt-get` / `apt` processes are
stopped and `dpkg --configure -a` runs before the lock wait, so the
retry does not start against a lock held by the previous attempt.
- `APT_PREFER_FAST_MIRROR=0` turns the mirror handling off. Without
`/etc/apt/apt-mirrors.txt` or `curl` the helper behaves exactly as
before.

## Tests

- New `tests/studio/test_apt_mirror_preference.py` runs the real helper
against a temporary mirror file with `sudo`, `curl`, `pkill`, `dpkg` and
`fuser` stubbed on `PATH`: fastest mirror first, a fast Azure mirror
keeps its place, a failed attempt demotes the leader, ranking happens
once per job, ports mirrors get no global archive, the opt-out and a
missing mirror file leave things untouched.
- `test_apt_steps_are_bounded.py` now counts the probe (up to 4 x 5 s
per job) and the 2 s orphan stop in each step's worst case; every
existing step budget still fits.
- The probe URL returns 200 with the same 1.79 MB file on
`azure.archive.ubuntu.com`, `archive.ubuntu.com` and
`security.ubuntu.com`.
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