DEVPROD-4021: conditional runs for non-Buildkite affecting CI checks#1490
Open
DEVPROD-4021: conditional runs for non-Buildkite affecting CI checks#1490
Conversation
This introduces a script that checks what files have changed in a PR. If only docs or github workflows changed, it skips the heavy test suite and simply generates dummy passing statuses for all required checks, saving CI resources. Ref: DEVPROD-4021
1be49b3 to
aadd47a
Compare
Member
Author
|
@claude review once |
There was a problem hiding this comment.
Pull request overview
Adds a Buildkite entrypoint script to conditionally skip the heavy operator CI test suite on PRs that only touch documentation or GitHub workflows, while still reporting passing GitHub commit statuses for required checks.
Changes:
- Introduce
.buildkite/scripts/conditional_testsuite.shto detect PR-only doc/GitHub workflow changes and upload either a dummy “pass” pipeline or the full testsuite pipeline. - Update
.buildkite/pipeline.ymlci-entry-pointstep to run the new conditional script instead of directly uploading.buildkite/testsuite.yml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .buildkite/scripts/conditional_testsuite.sh | New PR change-detection logic and dummy pipeline uploader for doc/workflow-only changes. |
| .buildkite/pipeline.yml | Switch CI entrypoint to use the conditional testsuite uploader script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+17
to
+21
| # Check if any non-docs/non-GHA files changed | ||
| requires_ci=false | ||
| for file in $changed_files; do | ||
| if [[ ! "$file" =~ ^docs/ && ! "$file" =~ ^\.github/ ]]; then | ||
| requires_ci=true |
| cat << 'PIPELINE' | buildkite-agent pipeline upload | ||
| steps: | ||
| - command: echo "Skipped CI as no source files changed" | ||
| label: ":fast_forward: Skipped" |
| context: "Integration Tests" | ||
| - github_commit_status: | ||
| context: "Acceptance Tests" | ||
| - github_commit_status: |
Comment on lines
+12
to
+24
| git fetch origin $base_branch | ||
|
|
||
| # Get changed files | ||
| changed_files=$(git diff --name-only origin/$base_branch...HEAD) | ||
|
|
||
| # Check if any non-docs/non-GHA files changed | ||
| requires_ci=false | ||
| for file in $changed_files; do | ||
| if [[ ! "$file" =~ ^docs/ && ! "$file" =~ ^\.github/ ]]; then | ||
| requires_ci=true | ||
| break | ||
| fi | ||
| done |
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.
Summary
This introduces a script that checks what files have changed in a PR.
If only docs or github workflows changed, it skips the heavy test suite
and simply generates dummy passing statuses for all required checks,
saving CI resources.
Ref: https://redpandadata.atlassian.net/browse/DEVPROD-4021