ci(tests): read vars.CI_RUNS_ON, with ubuntu-latest as the fallback - #370
Open
ywatanabe1989 wants to merge 1 commit into
Open
ci(tests): read vars.CI_RUNS_ON, with ubuntu-latest as the fallback#370ywatanabe1989 wants to merge 1 commit into
ywatanabe1989 wants to merge 1 commit into
Conversation
The repository variable CI_RUNS_ON was set to point CI at our own hardware, but this workflow hardcoded `runs-on: ubuntu-latest`, so the variable was never read: the write was verified, the effect was not, and reruns kept landing on GitHub-hosted runners. The job now consults the variable and falls back to the literal '["ubuntu-latest"]' when it is unset, so this is inert on any repo or fork where the variable is absent.
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.
The problem
The repository variable
CI_RUNS_ONwas set on this repo to point CI at our ownhardware. It changed nothing, because the
testsworkflow never READ it — the jobhardcoded
runs-on: ubuntu-latest. The variable write was verified; the effect wasnot. A rerun still landed on a GitHub-hosted runner ("GitHub Actions 1000048594",
16m57s).
What now consults it
.github/workflows/pytest-matrix-on-ubuntu-py3-11-3-12-3-13.yml, jobtest:Same pattern already proven in
scitex-agent-container, whose jobs demonstrablyrun on
scitex-0X-org-cpu-01.CI_RUNS_ONis SET (currently["self-hosted","Linux","X64","scitex-org-cpu"]),the matrix runs on our compute pool.
literal
'["ubuntu-latest"]'fallback applies and behaviour is byte-for-byte whatit was.
No other job or workflow is touched; nothing else in the file changes.
Verification
The point of this change is the landing runner, not the diff. This PR's own
testsrun is the check:
gh api repos/scitex-ai/scitex-python/actions/runs/<id>/jobs --jq '.jobs[]|"\(.runner_name) \(.name) \(.conclusion)"'must reportscitex-0X-org-cpu-01, notGitHub Actions NNNN.