Repository navigation
feat(ci): take the resolve-toolchain runner from a repository variable - #1808
Merged
Merged
Conversation
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
The
resolve-toolchainjob in all seven scaffolded workflows that declare it now takes its runner from the repository or organization variableDEVKIT_CI_RESOLVE_RUNNER:varsresolves server-side before any runner is provisioned, so this avoids the chicken-and-egg problem that rules out.vig-os. When the variable is unset, the job stays on the hosted default, so nothing changes for existing consumers. A private consumer can opt in to stop paying one billed hosted minute per workflow run.Type of Change
feat-- New featureModifiers
!) -- This change breaks backward compatibilityChanges Made
assets/workspace/.github/workflows/{ci,sync-issues,sync-main-to-dev,abandon-release,prepare-hotfix,promote-release,release}.yml: theresolve-toolchainruns-onis now overridable by the variable (one line each). I also updatedci.yml's header comment.assets/workspace/.vig-os: theDEVKIT_CI_RUNNERcomment now points the resolve jobs at the variable.docs/MIGRATION.md: the "some jobs always stay hosted" limitation is replaced with a section on the variable. It covers how to set it, that the value is one label and not a list, that nothing validates it, and that it is not an outage fallback.tests/test_ci_runner.py: the two "stays hosted" asserts are replaced with a parametrized check over all seven workflows. A completeness test also fails if a scaffolded workflow adds aresolve-toolchainjob that is missing from the list.Validation (the issue's second spike point)
The issue asks for validation in
resolve-toolchainor documentation of the failure mode. Validating in the job isn't possible: the job is the thing waiting for a runner, so an unmatched label queues and never fails. I documented the failure mode instead, along with the fix that needs no commit (gh variable delete DEVKIT_CI_RESOLVE_RUNNER).Changelog Entry
Added
DEVKIT_CI_RESOLVE_RUNNERvariable for theresolve-toolchainjobs(#1796)
resolve-toolchainjob in all seven scaffolded workflows that declare ittakes its runner from the repository or organization variable
DEVKIT_CI_RESOLVE_RUNNER(one runner label), so a private consumer stopspaying a billed hosted minute per workflow run for it
ubuntu-26.04default, unchanged for every existingconsumer; an unmatched label queues rather than failing, as documented in
docs/MIGRATION.mdTesting
just test): 1707 passed, 1 skipped.test_image/test_integrationwere excluded because the local:devimage is stale. CI covers them.Manual Testing Details
Spike (the issue's first point, same method as #992). A temporary push-triggered workflow was added in 8bdb60b and removed in ee4f19c. Run: https://github.com/vig-os/devkit/actions/runs/37143060031 (green).
runs-on${{ vars.CACHIX_CACHE && 'ubuntu-26.04-arm' || 'ubuntu-26.04' }}arch=aarch64: the existing org variable steered the runner${{ vars.DEVKIT_SPIKE_1796_UNSET || 'ubuntu-26.04' }}arch=x86_64: fell back to the defaultThe repo's settings were not changed. The spike used the existing
CACHIX_CACHEorg variable.just precommitis green over all files.actionlinton the template workflows reports the same 4 pre-existing findings before and after. They are reusable-workflow file lookups that fail only when linting outside the repo root.Checklist
CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
Consumers pick this up through the usual
devkit-upgradeadoption once a release ships it. To opt in, set the variable at repo or org level after adopting.Refs: #1796