Pick CI's random matrix values with bash instead of a marketplace action - #626
Merged
Conversation
The rngs gate jobs and every build_and_test job resolved
ddradar/choose-random-action before starting, and GitHub's action
resolution service has been failing that lookup with repeated 5xx
errors ("Internal Server Error occurred while resolving
ddradar/choose-random-action@v4.1.0", also plain Service Unavailable).
A failure in a rngs job cancels everything gated behind it: the whole
11-job matrix in test_and_build.yml and the test_imports job in
imports.yml, which triggers on every pull request. Ten of the last ten
red Test runs died exactly there before running anything.
All six RNG steps (four in test_and_build.yml, two in imports.yml)
drew uniformly from small lists, which bash can do by itself: index an
array with RANDOM modulo its length. RANDOM is a bash builtin, so it
works in the ubuntu default shell, git-bash on Windows, and the bash
3.2 that macOS runners provide, and the jobs no longer download
anything to make their picks. Weighting a choice is now expressed by
repeating it in the list, and skipping one by removing it, which
replaces the action's natural-number weights mechanism (the old
comment about setting weights very large to skip an entry is gone with
it).
Verified: both workflows parse as YAML, the snippet produces uniform
draws under bash 3.2.57 (macOS's /bin/bash, with -e -u -o pipefail),
and no uses: of the action remain in any workflow.
Member
Author
|
LGTM, but should probably wait until CI runs for this before merging. The queue has been pretty backed up, but that's okay, we're patient. Our randomized CI has been earning its keep: we've been finding and fixing things, but this has led to the stacked PRs having a lot of CI jobs. Let's call this an exercise in confidence! As with some other agent-assisted PRs, the comments can be a little verbose, but I may do a pass at improving them for all PRs in this stack in... a new PR for this stack. |
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 rngs gate jobs and every build_and_test job resolved
ddradar/choose-random-action before starting, and GitHub's action
resolution service has been failing that lookup with repeated 5xx
errors ("Internal Server Error occurred while resolving
ddradar/choose-random-action@v4.1.0", also plain Service Unavailable).
A failure in a rngs job cancels everything gated behind it: the whole
11-job matrix in test_and_build.yml and the test_imports job in
imports.yml, which triggers on every pull request. Ten of the last ten
red Test runs died exactly there before running anything.
All six RNG steps (four in test_and_build.yml, two in imports.yml)
drew uniformly from small lists, which bash can do by itself: index an
array with RANDOM modulo its length. RANDOM is a bash builtin, so it
works in the ubuntu default shell, git-bash on Windows, and the bash
3.2 that macOS runners provide, and the jobs no longer download
anything to make their picks. Weighting a choice is now expressed by
repeating it in the list, and skipping one by removing it, which
replaces the action's natural-number weights mechanism (the old
comment about setting weights very large to skip an entry is gone with
it).
Verified: both workflows parse as YAML, the snippet produces uniform
draws under bash 3.2.57 (macOS's /bin/bash, with -e -u -o pipefail),
and no uses: of the action remain in any workflow.
Stack created with GitHub Stacks CLI • Give Feedback 💬