Test generated workflow matrix schemas#6277
Open
ScottTodd wants to merge 6 commits into
Open
Conversation
Mirror the PyTorch release workflow toggle for JAX so manual multi-arch dev releases can skip JAX wheels by default while workflow_call release runs continue to build them. Add a small JAX release matrix script so JAX can share the top-level python_version narrowing behavior. Also add focused tests for the JAX matrix script and current PyTorch release matrix behavior. Testing: - D:/projects/TheRock/.venv/Scripts/python.exe -m pytest github_actions/tests/configure_jax_release_matrix_test.py github_actions/tests/configure_pytorch_release_matrix_test.py - pre-commit run --files .github/workflows/multi_arch_release.yml .github/workflows/multi_arch_release_linux.yml .github/workflows/multi_arch_release_linux_jax_wheels.yml build_tools/github_actions/configure_jax_release_matrix.py build_tools/github_actions/configure_pytorch_release_matrix.py build_tools/github_actions/tests/configure_jax_release_matrix_test.py build_tools/github_actions/tests/configure_pytorch_release_matrix_test.py Assisted-by: Codex
Avoid exhaustively asserting the expanded default matrix. Check that the default matrix spans multiple Python versions and JAX refs, and that explicit Python versions narrow every generated row. Testing: - D:/projects/TheRock/.venv/Scripts/python.exe -m pytest github_actions/tests/configure_jax_release_matrix_test.py - D:/projects/TheRock/.venv/Scripts/python.exe -m pytest github_actions/tests/configure_pytorch_release_matrix_test.py - pre-commit run --files build_tools/github_actions/tests/configure_jax_release_matrix_test.py Assisted-by: Codex
Add workflow YAML helpers for extracting matrix references and use them to verify generated matrix rows satisfy the workflow with-block fields that consume them. Assisted-by: Codex
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
…rix-workflow-tests
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.
Motivation
Overall CI test quality improvement as part of #3336.
We've been replacing inline workflow matrix code with dynamic matrix generator scripts but the data produced by these scripts was only tested by actually running the workflows. This adds unit test coverage ensuring that every
matrix.valuekey in each workflow file is actually produced for every row of a generated matrix. This won't catch all errors, but it will give us more confidence and guard against typos.See prior PRs:
Technical Details
I decided to start by just checking one way: every
matrix.valuein a workflow must be produced by the generator. The opposite direction (the generator producing a value not used by a workflow) is not checked yet. Some jobs may only want to read a subset of the values and that could be okay.Test Plan
Each of the new tests can fail with mismatches in either the workflows or the generator scripts:
with errors like
Submission Checklist