Repository navigation
ci-flake: cache apt runtime packages in desktop-windows Linux smoke job - #23343
Git-on-my-level wants to merge 3 commits into
Conversation
Codex Review SummaryThis 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. |
The build-linux job's 'Install Linux runtime dependencies' step downloads ~35 MB of .debs from azure.archive.ubuntu.com every uncached run; when runner<->mirror throughput degrades (~68 KB/s avg in job 120062237675) the download alone exceeds the 5-minute step budget while every connection keeps streaming, so the per-request apt timeouts cannot catch it. Same signature on main 2026-10-07 (job 113037996050); the re-run of the same job on the same PR code succeeded. Cache the .deb archives (seed /var/cache/apt/archives, download-only, capture, unpack) so steady-state installs download nothing but version changes, and raise the step budget to 10 minutes to cover cold-cache runs at the worst observed throughput (34.6 MB / 68 KB/s ~ 8.5 m). Stall bounds and the 20-minute job ceiling are unchanged.
…rror evidence This PR's own first run (job 120074210159) missed the apt cache (first run with the new key) and streamed the deb pool at ~40-45 KB/s — worse than the 68 KB/s the 10-minute budget was sized from — timing out mid-download at Get:30 of 30 (~14.4 min of pure download needed at that pacing). 20 minutes covers ~32 KB/s effective throughput while reserving 2 minutes for index fetch and unpack, and is idempotent for warm-cache runs, which download nothing and finish in seconds. Note the budget must cover the cold path even though cache misses are rare: the key hashes this workflow file, so every edit re-cold-starts the cache.
b0225ac to
c5e2116
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5e2116974
ℹ️ 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".
Address Codex review of c5e2116: 1. Cache key pinned the workflow file hash, which stays an exact match forever (actions/cache never re-saves on exact hit): cached .debs would freeze at first-saved versions as Ubuntu publishes updates, and every workflow edit gratuitously cold-started the cache. Key on ${ImageOS}-${ImageVersion} plus a literal package-list token instead, matching the scheme already established in PR #23344; the restore-key prefix carries still-current .debs across runner image bumps. 2. The step budget raise (10 -> 20) ignored the pre-existing job-level timeout-minutes: 20 on build-linux. Worst case cold apt (14.4 min measured pacing) + ~70s setup + ~5m packaging/smoke exceeds 20 min, cancelling the job mid-packaging; a cancelled job never saves the cache (save-always: false), so every retry stays cold. Raise the job budget to 30 so the cold path fits and the cache actually warms.
|
Monitor run (context
Verified: |
There was a problem hiding this comment.
4 issues found across 2 files
Confidence score: 4/5
- In
.github/workflows/desktop-windows-ci.yml, the cache key can stay an exact hit when Ubuntu package versions change, so updated.debsare never saved and keep getting downloaded. Include package versions in the key. - In
.github/workflows/desktop-windows-ci.yml, a packaging or smoke-test failure prevents the cache from being saved, so retries repeat the ~35 MB download. Save the cache independently of those later job steps. - In
scripts/ci/test_nightly_main_workflow.py, the pinned limits conflict with the workflow and PR description: the job ceiling rises from 20 to 30 minutes, and the step is set to 20, not 10. Align the description and pin with the actual limits. - In
scripts/ci/test_nightly_main_workflow.py, the comment gives the wrong p50 budget;build-linuxremains at 9 minutes inci-budget.yaml. Update the comment to 9.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/ci/test_nightly_main_workflow.py">
<violation number="1" location="scripts/ci/test_nightly_main_workflow.py:51">
P3: This comment cites the wrong p50 budget. `ci-budget.yaml` sets `desktop-windows-ci.yml/build-linux` to `budget_p50_minutes: 9`, and this PR leaves that unchanged. Change the comment to say 9.</violation>
<violation number="2" location="scripts/ci/test_nightly_main_workflow.py:52">
P3: This pin records a job-level ceiling increase from 20 to 30, but the PR description says job-level limits are unchanged and the step goes to 10 minutes. The workflow actually sets the step to 20 minutes. Update the PR description so the reviewed budget change matches the code.</violation>
</file>
<file name=".github/workflows/desktop-windows-ci.yml">
<violation number="1" location=".github/workflows/desktop-windows-ci.yml:193">
P2: Ubuntu apt package versions can change without `ImageVersion` changing, leaving this as an exact cache hit. Since exact caches are immutable, changed `.debs` are never saved and are downloaded on every run; include resolved package versions in the key.</violation>
<violation number="2" location=".github/workflows/desktop-windows-ci.yml:223">
P2: The apt package cache is only saved if the entire job succeeds, because the save runs in the cache action's post step. Packaging or smoke failures will therefore keep discarding the ~35 MB download and every retry re-downloads from the degraded mirror. Consider saving the cache from a dedicated step right after the install, with `if: always()` or `save-always`, so a later-step failure still persists the .debs.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 -o Acquire::https::Timeout=15 install -y --download-only imagemagick fonts-dejavu-core tesseract-ocr tesseract-ocr-eng xvfb | ||
| mkdir -p "$HOME/apt-debs" | ||
| if compgen -G "/var/cache/apt/archives/*.deb" > /dev/null; then | ||
| cp /var/cache/apt/archives/*.deb "$HOME/apt-debs/" |
There was a problem hiding this comment.
P2: The apt package cache is only saved if the entire job succeeds, because the save runs in the cache action's post step. Packaging or smoke failures will therefore keep discarding the ~35 MB download and every retry re-downloads from the degraded mirror. Consider saving the cache from a dedicated step right after the install, with if: always() or save-always, so a later-step failure still persists the .debs.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/desktop-windows-ci.yml, line 223:
<comment>The apt package cache is only saved if the entire job succeeds, because the save runs in the cache action's post step. Packaging or smoke failures will therefore keep discarding the ~35 MB download and every retry re-downloads from the degraded mirror. Consider saving the cache from a dedicated step right after the install, with `if: always()` or `save-always`, so a later-step failure still persists the .debs.</comment>
<file context>
@@ -161,17 +166,62 @@ jobs:
+ sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 -o Acquire::https::Timeout=15 install -y --download-only imagemagick fonts-dejavu-core tesseract-ocr tesseract-ocr-eng xvfb
+ mkdir -p "$HOME/apt-debs"
+ if compgen -G "/var/cache/apt/archives/*.deb" > /dev/null; then
+ cp /var/cache/apt/archives/*.deb "$HOME/apt-debs/"
+ fi
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 -o Acquire::https::Timeout=15 install -y imagemagick fonts-dejavu-core tesseract-ocr tesseract-ocr-eng xvfb
</file context>
| # workflow edit. Key on the runner image instead: ImageVersion bumps | ||
| # roll the key so refreshed .debs are saved, and package-list edits | ||
| # rotate via the literal token (matches the scheme in PR #23344). | ||
| key: apt-linux-runtime-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.linux-apt-image.outputs.image }}-imagemagick-dejavu-tesseract-xvfb |
There was a problem hiding this comment.
P2: Ubuntu apt package versions can change without ImageVersion changing, leaving this as an exact cache hit. Since exact caches are immutable, changed .debs are never saved and are downloaded on every run; include resolved package versions in the key.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/desktop-windows-ci.yml, line 193:
<comment>Ubuntu apt package versions can change without `ImageVersion` changing, leaving this as an exact cache hit. Since exact caches are immutable, changed `.debs` are never saved and are downloaded on every run; include resolved package versions in the key.</comment>
<file context>
@@ -161,17 +166,62 @@ jobs:
+ # workflow edit. Key on the runner image instead: ImageVersion bumps
+ # roll the key so refreshed .debs are saved, and package-list edits
+ # rotate via the literal token (matches the scheme in PR #23344).
+ key: apt-linux-runtime-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.linux-apt-image.outputs.image }}-imagemagick-dejavu-tesseract-xvfb
+ # Same restore-key strategy as #23344: fall back to the newest
+ # saved image of the same runner OS so image bumps reuse still-
</file context>
| # job never saves the apt cache (save-always: false), so every retry | ||
| # stayed cold. 30m fits the cold path; warm runs still finish in ~7m, | ||
| # so budget_p50 stays 7. | ||
| ("desktop-windows-ci.yml", "build-linux", "timeout-minutes"): "30", |
There was a problem hiding this comment.
P3: This pin records a job-level ceiling increase from 20 to 30, but the PR description says job-level limits are unchanged and the step goes to 10 minutes. The workflow actually sets the step to 20 minutes. Update the PR description so the reviewed budget change matches the code.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/ci/test_nightly_main_workflow.py, line 52:
<comment>This pin records a job-level ceiling increase from 20 to 30, but the PR description says job-level limits are unchanged and the step goes to 10 minutes. The workflow actually sets the step to 20 minutes. Update the PR description so the reviewed budget change matches the code.</comment>
<file context>
@@ -41,6 +41,15 @@ def jobs(text):
+ # job never saves the apt cache (save-always: false), so every retry
+ # stayed cold. 30m fits the cold path; warm runs still finish in ~7m,
+ # so budget_p50 stays 7.
+ ("desktop-windows-ci.yml", "build-linux", "timeout-minutes"): "30",
}
</file context>
| # 20m ceiling the cold path was cancelled mid-packaging, and a cancelled | ||
| # job never saves the apt cache (save-always: false), so every retry | ||
| # stayed cold. 30m fits the cold path; warm runs still finish in ~7m, | ||
| # so budget_p50 stays 7. |
There was a problem hiding this comment.
P3: This comment cites the wrong p50 budget. ci-budget.yaml sets desktop-windows-ci.yml/build-linux to budget_p50_minutes: 9, and this PR leaves that unchanged. Change the comment to say 9.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/ci/test_nightly_main_workflow.py, line 51:
<comment>This comment cites the wrong p50 budget. `ci-budget.yaml` sets `desktop-windows-ci.yml/build-linux` to `budget_p50_minutes: 9`, and this PR leaves that unchanged. Change the comment to say 9.</comment>
<file context>
@@ -41,6 +41,15 @@ def jobs(text):
+ # 20m ceiling the cold path was cancelled mid-packaging, and a cancelled
+ # job never saves the apt cache (save-always: false), so every retry
+ # stayed cold. 30m fits the cold path; warm runs still finish in ~7m,
+ # so budget_p50 stays 7.
+ ("desktop-windows-ci.yml", "build-linux", "timeout-minutes"): "30",
}
</file context>
| # so budget_p50 stays 7. | |
| # so budget_p50 stays 9. |
|
Folding batch (2026-11-04): this branch's tip was merged into the survivor PR #24477 ( |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
What
desktop-windows-ci→build-linux(Linux package · helper smoke) intermittently fails in Install Linux runtime dependencies withThe action 'Install Linux runtime dependencies' has timed out after 5 minutes.This PR removes the per-run apt download that causes it: it caches the runtime.debarchives between runs and re-times the step budget for cold-cache runs.Flake evidence (not a regression)
apt-get updatefetched indexes in ~10 s, thenapt-get installstreamed continuously but at degraded throughput — ~20.7 MB of the 34.6 MB needed in 5 m 02 s (~68 KB/s average) — until the 5-minute step timeout fired mid-download. Same signature on 2026-10-07 in job 113037996050 (run 37693118159), a push to main.Root cause
Every uncached run downloads ~35 MB of
.debarchives fromazure.archive.ubuntu.com. Runner↔mirror throughput is intermittently degraded to ~50–100 KB/s; the existingAcquire::Retries/Acquire::http(s)::Timeoutoptions cannot catch that (every connection is alive and streaming), so the download alone can exceed the 5-minute step budget.Fix (smallest durable change, CI infrastructure)
.debs (actions/cache@v6on~/apt-debs): seed/var/cache/apt/archivesbefore install, runinstall --download-only, capture the fetched files, then unpack. In steady state the install downloads nothing — apt verifies the cached files against the fresh indexes and fetches only version changes. The key tracks this workflow file so package-list edits rotate the cache, and therestore-keysprefix carries still-current.debs across other edits to this file. Approved direction: David approved caching CI dependencies (2026-10-22)..githubedits here touch only this flake's own step indesktop-windows-ci.yml; no workflows are added, no tests skipped or deleted.Verification
actionlint -shellcheck "" .github/workflows/desktop-windows-ci.yml(same pin as repo-checks) — pass.scripts/pr-preflight --pr-body-file— validated for this draft (laneci, no invariant citations or failure-class declarations required).Note: the
ci-flakelabel does not exist in this repo, so no label was added.