Repository navigation
fix(ci): give the retention-readiness cohort a cold-cache-safe timeout #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -145,8 +145,12 @@ jobs: | |
| # known-good commit were cancelled at the cap, each getting further through | ||
| # the same green steps (#693). A rerun is exactly what you reach for after a | ||
| # concurrency cancellation, so the old cap made healthy commits look red. | ||
| # 75 still bounds a genuinely hung job well under the windows job's 150. | ||
| timeout-minutes: 120 | ||
| # 240 minutes is the ceiling that lets the cold-cache step budgets below fit | ||
| # inside the job: the release Build, the lib/bins test compile, and each | ||
| # cohort step each carry their own run_with_timeout.py budget, and a cache | ||
| # miss makes the cargo-backed ones cost tens of minutes. It still bounds a | ||
| # genuinely hung job well under the windows job's 150-minute equivalent. | ||
| timeout-minutes: 240 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SUGGESTION: A 4-hour ceiling on the shared self-hosted runner can starve the other desk-linux jobs Every job in this workflow targets the self-hosted The ceiling only needs to be as large as the sum of the step budgets, so please confirm it is really needed once the duplicated cold compile is removed (see the comment on |
||
| # Some dependencies (e.g. convert_case 0.10.0 via derive_more/crossterm, and | ||
| # proc-macro2/quote) accidentally ship a `rust-toolchain.toml` *inside their | ||
| # published crate*. When cargo builds such a crate its CWD is that crate dir, | ||
|
|
@@ -233,10 +237,16 @@ jobs: | |
| - name: Run deterministic retention-readiness cohort | ||
| shell: bash | ||
| run: | | ||
| # A cold jcode-app-core test harness compiles heavy optional provider | ||
| # dependencies and can exceed three minutes on hosted runners. The | ||
| # cohort itself runs in under a second once the lib test is built. | ||
| python3 .github/scripts/run_with_timeout.py 600 \ | ||
| # A COLD jcode-app-core test harness compiles heavy optional provider | ||
| # dependencies and blows past ten minutes on hosted runners — observed | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SUGGESTION: "on hosted runners" is stale - this job runs on the self-hosted The build job's matrix is |
||
| # in run 39672218586 / job 119472777140, where this step died with | ||
| # "Command exceeded timeout after 600s" and exit code 124 while the | ||
| # sibling `Compile library and binary tests` step needed 23m07s for the | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: The cited 23m07s cannot be the sibling step's own cost - that step is capped at 900s This comment credits the sibling Either way this needs reconciling, because under the second reading the sibling step is still capped below the cold cost this PR cites (900s < 1387s) and would fail with the identical exit-124 signature on the next cold-cache run - the reported failure would simply move one step earlier. Please either correct the citation, or raise the sibling budget to the measured cold cost so the whole cold-cache path is covered. |
||
| # full workspace. The cohort itself still runs in under a second once | ||
| # the harness is built, so the budget only has to cover the one-time | ||
| # cold compile. 1800s is comfortably above the observed cold cost while | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: "comfortably above the observed cold cost" - this step's cold cost was never observed The only observation for this step is that it was killed at 600s, so its true cold cost is >600s with no measured upper bound. The 1387s figure quoted above belongs to a different cargo invocation (different package selection, therefore different feature unification), so it does not bound this step. Nothing in this PR demonstrates that 1800s is enough; if it is not, the same false-red failure returns on the next cache miss. Please size the budget from a measured cold run (log the wall time of one) or make this step's compile a cache hit, then state the measured number here instead of asserting the headroom. |
||
| # staying inside the job's timeout-minutes ceiling. | ||
| python3 .github/scripts/run_with_timeout.py 1800 \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: The budget bump does not address why this step re-compiles after the previous compile step The preceding compile step cannot be what pre-builds this cohort's target:
That second cold compile of the base spine is what the 600s budget actually paid for, and it is why the sibling step passing did not help. Cheaper deterministic fix: compile the cohort's exact target in the compile step, e.g. add |
||
| "$(rustup which cargo)" test --target ${{ matrix.target }} \ | ||
| -p jcode-app-core --lib retention_readiness -- --nocapture | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the timeout comparison.
The Build job’s 240-minute limit is greater than the stated 150-minute Windows limit. Correct or remove this comparison.
🧰 Tools
🪛 zizmor (1.30.1)
[warning] 1-780: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[warning] 136-459: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents