Repository navigation
CI: fold the mac update smoke into the same job, running last as teardown - #7980
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e88882073
ℹ️ 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".
| # --------------------------------------------------------------- | ||
| - name: First update should be a no-op (prebuilt already validated) | ||
| id: update_first | ||
| if: ${{ !cancelled() && steps.install_unsloth.outcome == 'success' && steps.assert_llama.outcome == 'success' }} |
There was a problem hiding this comment.
Decouple the install gate from GGUF priming
When the HF cache misses and the GGUF download fails, or when the cache-save action fails, Install Unsloth is still skipped by its implicit success() because it follows those UI-only steps; its outcome is therefore skipped, so this condition suppresses the entire update/uninstall phase. The deleted update workflow did not prime or save a GGUF before installing, so an unrelated Hugging Face/cache outage now removes the only macOS coverage of studio update and scripts/uninstall.sh. The new explicit phase conditions do not address this earlier dependency; move the shared install ahead of GGUF priming or otherwise allow it to run after those unrelated failures.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Checked both mechanisms against the actual steps, and neither can fire.
-
"The GGUF download fails." It cannot fail the step.
Prime HF_HOMEcalls .github/scripts/hf-download-with-retry.sh, whose loop has exactly one exit:exit 0on success. Every other outcome (non-zero rc, a stall past HF_DOWNLOAD_STALL_SECONDS, evenhfnot being on PATH) incrementsattemptand continues, and its own header says so: "Retries are unbounded -- the enclosing GitHub Actions job's timeout-minutes is the real bound." So a Hugging Face outage does not produce a failed step, it produces a hang until the job's 65 minutes are up. That is a cancellation, not a failure, so noif:rescues it, and the suggested reorder does not either: install would already have run, but the update phase sits after the hung prime step and the runner is gone before it is reached. -
"The cache-save action fails."
actions/cache/savereports save problems as warning annotations and does not fail the step; the toolkit swallows the reserve exception rather than propagating it (cache.saveCache should raise an error on reserve failure, but doesn't actions/toolkit#1642, and the familiar "Failed to save: Unable to reserve cache with key ..., another job may be creating this cache" that shows up as a warning). The restore above it is alreadycontinue-on-error: true, so a cache miss or a restore error leaves the job status success too.
What is left is python -m pip install --upgrade huggingface_hub in that same step failing, and install.sh does far more pip and network work than one upgrade, so it would not survive a PyPI outage either. Against that, !cancelled() on the install step would spend about ten minutes of a macOS slot (capped at 5 account-wide, shared with unsloth-zoo) on a guaranteed-failing install after a broken checkout or setup-python.
Also worth noting that the update phase does not use the primed cache at all: assert-llama-loads.sh only runs llama-server --version plus a static vtool minimum-OS check, and the phase itself is studio update, an /api/health boot, and uninstall.sh. The GGUF exists for the Playwright chat runs.
The Playwright case in your previous comment was different in kind, and that is why it got a fix: that phase fails for real and often enough that the step carries a three-attempt flake-retry loop.
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
908e033 to
7ab1f26
Compare
…down Third and last macos-14 job that shared the byte-identical install.sh --local --no-torch plus assert-llama-loads.sh bootstrap. A single studio/** PR was paying three macOS slots and three full installs to test three surfaces of the same install, against a pool capped at 5 concurrent jobs account-wide and shared with unslothai/unsloth-zoo. The update phase runs LAST, and that ordering is load-bearing rather than incidental. It ends by running scripts/uninstall.sh and asserting the machine is clean. That step is the assertion under test, not this job's teardown: it is step 31 of 32, and the only thing after it is the artifact upload, which reads logs/ and nothing else. So a broken uninstall.sh fails this job, which is the point, without corrupting any earlier phase. Nothing that needs Unsloth installed may ever be appended after it. Deliberately not using uninstall.sh as a general between-phase cleanup. Using the code under test to reset state for later tests is circular: a regression in uninstall.sh would silently poison whatever ran next instead of failing here. That is also why the phases are ordered rather than reset-and-repeated. Collisions resolved: the update phase booted on 18891 (distinct) but wrote logs/studio.log, which the UI phase already owns, so it would have truncated the UI server log; it now writes logs/studio_update.log. Its four log files are carried into the existing artifact upload. scripts/uninstall.sh is added to the paths filter -- it is the one path the update workflow watched that this one did not already cover. Verified: one job, 32 steps, no duplicate step ids, exactly one install (was 3 across the three workflows), five distinct ports, four distinct server logs, uninstall last, and the extracted test-command set across both absorbed workflows is unchanged at 12 commands with none lost. macOS jobs: 29 -> 28 on top of #7975; a studio/** PR now starts 4 instead of 6.
A step with no `if:` gets an implicit `success()`, so after the fold a single
flaky Playwright failure above skipped the whole update + uninstall phase. As
its own workflow it ran regardless, and it is the only Mac coverage of
`studio update` and scripts/uninstall.sh, so the fold quietly made that
coverage conditional on the least reliable phase in the job.
`!cancelled()` overrides the implicit success() while the step-outcome checks
still require a working install to test against: the first update needs
install.sh plus assert-llama-loads.sh, the second needs the first, and the
post-update boot needs the second. Uninstall is gated on the install alone
since it is a separate surface, and a broken `studio update` must not hide
whether the machine still comes out clean.
The `${{ }}` wrapper is required rather than stylistic: a bare leading `!` is
a YAML tag indicator and fails to parse. Verified with actionlint, which also
typechecks every steps.<id> reference.
hf-download-with-retry.sh retries forever by design, and its own header says the enclosing job's timeout-minutes is the only bound. So the hf-xet stall that script exists to survive does not fail the priming step, it hangs it: the job burns all 65 minutes and is cancelled, and no `if:` survives a cancellation. Before the fold that cost the UI phases only, because the update workflow was a separate job that never primed a GGUF. After it, one Hugging Face stall removes the only macOS coverage of `studio update` and scripts/uninstall.sh. Priming now carries timeout-minutes: 25, and the two bootstrap steps carry `!cancelled()` so they still run when it trips. A step-level timeout is a step failure rather than a cancellation, which is what makes this work; verified on a real runner rather than from the docs, which do not spell it out. A probe job with a 1-minute step timeout on a sleeping step recorded that step failure/failure, ran every `!cancelled()` and `failure()` step after it, and skipped both the bare implicit-success() step and the `cancelled()` one. 25 minutes is about 7x the healthy time for a ~200 MB GGUF plus stories260K, so a merely slow download will not trip it, and the update phase needs no GGUF at all: assert-llama-loads.sh runs llama-server --version plus a static vtool minimum-OS check, and the phase itself is update, an /api/health boot, and uninstall.
172ef23 to
934d08b
Compare
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
|
pre-commit.ci run |
Summary
Stacks on #7975. Third and last
macos-14job sharing the byte-identical bootstrap:A single
studio/**PR was paying three macOS slots and three full installs to test three surfaces of the same install, against a pool capped at 5 concurrent jobs account-wide and shared withunslothai/unsloth-zoo.After this: one install, three phases. A
studio/**PR starts 4 macOS jobs instead of 6.On uninstall.sh being the cleanup mechanism
Worth being explicit, because it is the obvious thing to get wrong here:
uninstall.shis not used as this job's teardown.Using the code under test to reset state for later tests is circular. A regression in
uninstall.shwould silently poison whatever ran next, instead of failing where the bug is.So the update phase runs last, and that ordering is load-bearing:
logs/and nothing elseuninstall.shtherefore fails this job, which is the point, and cannot corrupt an earlier phaseNothing that needs Unsloth installed may ever be appended after that step; the comment in the workflow says so.
For the same reason the phases are ordered rather than reset-and-repeated. Genuine reset-between-phases would need teardown independent of the code under test, and on macOS runners there is no good primitive for it:
bwrapis Linux namespaces and has no macOS equivalent, and APFS snapshot rollback needs root plus a reboot, which is not something a hosted runner can do mid-job.Collisions resolved
logs/studio.log, already owned by the UI phaselogs/studio_update.logscripts/uninstall.shnot in this workflow'spathsPort 18891 was already distinct, so it is unchanged.
Verification
Uninstall and verify cleanis the last step before upload; confirmed nothing after it needs Unsloth installedNote on the base branch
Targets
ci/consolidate-macos-smoke-jobs(#7975) rather thanmain, since it builds on that merge. Retarget tomainonce #7975 lands.