Run newly added tests in PRs on TPU7X runners#4422
Draft
darisoy wants to merge 17 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
… manual triggers run full suites
…X on PRs without new tests
… code quality check passes 100%
…perly restricts to newly_added
…r fails with dubious ownership
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
This PR enables running newly added or modified tests on TPU v7x runners (
tpu7x-unit,tpu7x-integration,tpu7x-post-training-unit) during Pull Request checks (github.event_name == 'pull_request'), in addition to nightly schedules and manual workflow triggers.Specifically, this PR:
.github/workflows/ci_pipeline.yml(tpu7x-tests) to execute on Pull Request events when package build dependencies succeed.flavorthrough.github/workflows/run_tests_coordinator.ymlinto.github/workflows/run_tests_against_package.yml.and newly_addedtoFINAL_PYTEST_MARKERfor non-scheduled TPU7X test runs (INPUTS_FLAVOR =~ ^tpu7x-).5(No tests collected) so pull requests that do not add or modify tests complete cleanly (SUCCESS) in ~45 seconds without failing the CI pipeline.BUGS: b/530220873
FIXES: b/530220873
Tests
Verified end-to-end on physical TPU v7x runners (
tpu7x-8) across 3 scenarios:workflow_dispatch) with 0 Added Tests:... and newly_added, matches0items (0 selected / 2610 deselected), and returns exit code5. Our exit code5trap catches this, logs"No tests collected matching marker '... and newly_added'. Passing cleanly.", and marks all TPU7X jobs green (SUCCESS) in ~48 seconds.pull_request) with 0 Added Tests:PR #4422) automatically trigger all three TPU7X jobs (tpu7x-unit,tpu7x-integration,tpu7x-post-training-unit). Because 0 test functions were touched, PyTest fast-paths (0 selected, exit code5) and completes green (SUCCESS) in ~48 seconds without reserving long TPU runtimes.pull_request) with 1 Added Test:test_dummy_tpu7x_newly_added). AST diff detection (get_changed_tests()) isolated the new function and PyTest executed strictly that 1 test ontpu7x-8hardware (1 selected / 2611 deselected), completingSUCCESSacrosstpu7x-unit(job 86431286035),tpu7x-integration(job 86431280394), andtpu7x-post-training-unit(job 86431280253).Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.