Repository navigation
ROX-37371: Prototype for PR CI test selection #23166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
vikin91
wants to merge
36
commits into
master
Choose a base branch
from
piotr/ROX-36969-ci-prototype-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
95bf99d
X-Smart-Branch-Parent: master
jschnath 80f8906
Add a local prototype for pull-request test selection.
vikin91 bdc9873
Drop Python bytecode from the test-selection prototype.
vikin91 f31d23a
Give an explicit /test priority when the comment list is missing.
vikin91 8ad29fe
Keep fork pull requests and /test timestamps on the existing rules.
vikin91 66bed99
Add pydoc and rename files
vikin91 3962b86
Set defaults to match the current state
vikin91 1fdd9db
Fix the docs-only rule
vikin91 cd1dce9
Improve the log format
vikin91 834ea1b
Write numbered logs and drop generated decision comments.
vikin91 de44adf
Skip end-to-end jobs when a pull request only touches CI tooling.
vikin91 844b4d2
Rename the path match modes so the diff is the subject.
vikin91 65af9e4
Compact log
vikin91 55277ae
Rule: always run style
vikin91 329e620
Add pycache to gitignore
vikin91 675b797
A clash between run and skip runs the job.
vikin91 56160f2
Add resolver edge-case tests and fixtures.
vikin91 245a10f
Keep the match line when a rule's targets all clash.
vikin91 dc2a902
Reject a remaining rule that is not last.
vikin91 0e2fc07
Say "all N changed files" when an any-file rule hits the whole diff.
vikin91 6abea1b
Explain 'when' conditions using sets arithmetics
vikin91 d9a82aa
Add matching example to readme
vikin91 8ab219e
Style: Allow resolver to be a big file
vikin91 e91acdd
Add more test domain rules
jschnath 5457183
Wire test jobs to read CI decisions
jschnath 2d88e22
Fix CI selector test suite for updated rules
jschnath 4793530
[CI-TEST] Add sensor detector file to validate test selection
jschnath 754419f
[CI-TEST] Test UI-only rule - expect ui tests only
jschnath 14f5217
[CI-TEST] Test docs-only rule
jschnath ce7a58d
[CI-TEST] Test tree-may-have-changed rule (go.mod)
jschnath f14030b
[CI-TEST] Clean up test validations
jschnath ddb3809
[CI-TEST] Test ci-tooling rule
jschnath 823b574
[CI-TEST] Test scanner-only rule
jschnath c7bfd9b
[CI-TEST] Test central-sensor-communication (central/alert)
jschnath b484b03
[CI-TEST] Test central-sensor-shared-pkg (pkg/grpc)
jschnath 759f74a
[CI-TEST] Complete - All major rules validated ✅
jschnath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: CI decision | ||
|
|
||
| # Prints the decision for a pull request. It does not start or stop other | ||
| # jobs. The label ci-dispatcher-enforce is read by the jobs that follow | ||
| # the decision. | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - synchronize | ||
| - labeled | ||
| - unlabeled | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| decision: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # ratchet:actions/checkout@v7.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
|
|
||
| - name: Print the CI decision | ||
| env: | ||
| CI_ENFORCE: ${{ contains(github.event.pull_request.labels.*.name, 'ci-dispatcher-enforce') }} | ||
| CI_REPO: ${{ github.repository }} | ||
| CI_PR: ${{ github.event.pull_request.number }} | ||
| CI_COMMIT: ${{ github.event.pull_request.head.sha }} | ||
| CI_BASE: ${{ github.event.pull_request.base.sha }} | ||
| CI_HEAD: ${{ github.event.pull_request.head.sha }} | ||
| PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }} | ||
| run: ci/select/gha-gate.sh |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.