Skip to content

feat(ci): take the resolve-toolchain runner from a repository variable - #1808

Merged
c-vigo merged 4 commits into
devfrom
feature/1796-resolve-runner-var
Oct 3, 2026
Merged

c-vigo merged 4 commits into
devfrom
feature/1796-resolve-runner-var

Conversation

@c-vigo

@c-vigo c-vigo commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Description

The resolve-toolchain job in all seven scaffolded workflows that declare it now takes its runner from the repository or organization variable DEVKIT_CI_RESOLVE_RUNNER:

runs-on: ${{ vars.DEVKIT_CI_RESOLVE_RUNNER || 'ubuntu-26.04' }}

vars resolves 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 feature

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • assets/workspace/.github/workflows/{ci,sync-issues,sync-main-to-dev,abandon-release,prepare-hotfix,promote-release,release}.yml: the resolve-toolchain runs-on is now overridable by the variable (one line each). I also updated ci.yml's header comment.
  • assets/workspace/.vig-os: the DEVKIT_CI_RUNNER comment 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 a resolve-toolchain job that is missing from the list.

Validation (the issue's second spike point)

The issue asks for validation in resolve-toolchain or 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_RUNNER variable for the resolve-toolchain jobs
    (#1796)
    • The resolve-toolchain job in all seven scaffolded workflows that declare it
      takes its runner from the repository or organization variable
      DEVKIT_CI_RESOLVE_RUNNER (one runner label), so a private consumer stops
      paying a billed hosted minute per workflow run for it
    • Unset => the hosted ubuntu-26.04 default, unchanged for every existing
      consumer; an unmatched label queues rather than failing, as documented in
      docs/MIGRATION.md

Testing

  • Tests pass locally (just test): 1707 passed, 1 skipped. test_image/test_integration were excluded because the local :dev image is stale. CI covers them.
  • Manual testing performed (describe below)

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).

Job runs-on Result
set variable ${{ vars.CACHIX_CACHE && 'ubuntu-26.04-arm' || 'ubuntu-26.04' }} arch=aarch64: the existing org variable steered the runner
unset variable ${{ vars.DEVKIT_SPIKE_1796_UNSET || 'ubuntu-26.04' }} arch=x86_64: fell back to the default

The repo's settings were not changed. The spike used the existing CACHIX_CACHE org variable.

  • just precommit is green over all files.
  • actionlint on 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

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Consumers pick this up through the usual devkit-upgrade adoption once a release ships it. To opt in, set the variable at repo or org level after adopting.

Refs: #1796

@c-vigo
c-vigo merged commit 229a923 into dev Oct 3, 2026
16 checks passed
@c-vigo
c-vigo deleted the feature/1796-resolve-runner-var branch October 3, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant