Repository navigation
Stop CI setup from hanging in the mamba sharded-repodata fetch - #1180
Open
timlichtenberg wants to merge 7 commits into
Open
timlichtenberg wants to merge 7 commits into
timlichtenberg wants to merge 7 commits into
Conversation
The mamba solves of setup-proteus must run with sharded repodata off, and every workflow step that calls the action must carry a timeout of at most 30 minutes, since a step inside a composite action cannot have its own.
On macOS runners the mamba 2.9 shard fetch can stall with no timeout, in setup-miniconda's env creation and in the conda install step, until the job limit. The three mamba solves of setup-proteus now set MAMBA_USE_SHARDED_REPODATA=false and read the full repodata. A step inside a composite action cannot have a timeout, so each workflow step that calls setup-proteus sets timeout-minutes: 30, about twice the longest normal setup.
A setup with full-data can download FWL_DATA, so its step timeout is 50 min; a setup without it keeps 30 min. The caller check also finds a call written with a trailing slash or a ref, and counts the calls in the workflow text, so a caller cannot drop out of the check. The solve pattern now also finds conda, micromamba and env solves anywhere in a line.
A setup with full-data downloads the missing FWL_DATA inside the action, and the slowest one in the last 100 nightlies took 28 min. A 30 min limit would cancel such a setup before its caches are saved, so the next run starts cold again. 50 min stays below the job limit of each of these jobs and still stops a hung mamba solve long before the job limit.
A job limit given as an expression, as in the slow tier, is now read as the smallest of its default and the matrix job_minutes values, so a matrix entry below the setup timeout fails the test. An unquoted full-data: true maps to the same limit as the string, and the sharded repodata check runs per step.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1180 +/- ##
==========================================
- Coverage 96.27% 95.88% -0.39%
==========================================
Files 168 168
Lines 28951 28951
Branches 4778 4778
==========================================
- Hits 27872 27760 -112
- Misses 770 778 +8
- Partials 309 413 +104
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some nightly jobs sat in the
setup-proteusstep for hours. mamba 2.9.0 fetches sharded repodata by default, and on macOS runners that fetch can stall until the job limit cancels it. Example: the macOSmiscslow-tier job https://github.com/FormingWorlds/PROTEUS/actions/runs/47078479247/job/144228327531 logsFetch Shard Index for conda-forge/noarchat 12:53:17 and is cancelled by its 210 min job limit at 16:21:40 withmambastill running.Changes:
.github/actions/setup-proteus/action.yml:MAMBA_USE_SHARDED_REPODATA: 'false'on the 3 steps that solve an environment (the miniconda setup with itsmamba create, and themamba installstep for Linux and for macOS). mamba 2.9.0 reads this name for itsuse_sharded_repodatasetting (libmamba/src/api/configuration.cppat tag 2.9.0: theMAMBA_prefix plus the upper-case name).setup-proteusgetstimeout-minutes: 30 withfull-data: 'false', 50 withfull-data: 'true'(that flavour can download missing FWL_DATA). Each limit is below the cap of its job. A stalled setup now fails within the limit instead of holding a runner for hours.tests/tools/test_ci_setup_proteus.pyparses the action and all workflows: every solve step must set the variable to'false', and every caller step must have the timeout of itsfull-dataflavour, below the job cap (matrixjob_minutesincluded).Scope: only
setup-proteus.install.shand the conda-route install job useconda, notmamba, and do not change.Validation of changes
grep -c "Fetch Shard"andgrep -c "Using Flat Repodata"over the job logs; every log with a mamba solve reports libmamba 2.9.0:'false'uses:a composite action is enforced: a probe withtimeout-minutes: 1stopped after 72 s with "The action has timed out." and the job failed (https://github.com/FormingWorlds/PROTEUS/actions/runs/47182226165; the probe workflow is removed again in this branch).setup-proteusstep, from the step times of the runs (gh run view <run> --json jobs). The'true'setups of this branch are longer than in the older main runs; I did not isolate whether flat repodata or the data download causes that:full-data: 'false'full-data: 'true'pytest tests/tools/test_ci_setup_proteus.py tests/tools/test_ci_tier_coverage.py: 12 passed (macOS arm64, Python 3.12)src/changes, so the coverage of the package does not change.Lines and size,
pr-breakdown a28930bc c3f3c272:Checklist