Skip to content

DEVPROD-4021: conditional runs for non-Buildkite affecting CI checks#1490

Open
ivotron wants to merge 1 commit intomainfrom
devprod-4021-conditional-ci-runs
Open

DEVPROD-4021: conditional runs for non-Buildkite affecting CI checks#1490
ivotron wants to merge 1 commit intomainfrom
devprod-4021-conditional-ci-runs

Conversation

@ivotron
Copy link
Copy Markdown
Member

@ivotron ivotron commented Apr 28, 2026

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

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 28, 2026

CLA assistant check
All committers have signed the CLA.

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
@ivotron ivotron force-pushed the devprod-4021-conditional-ci-runs branch from 1be49b3 to aadd47a Compare April 28, 2026 19:15
@ivotron ivotron marked this pull request as ready for review April 28, 2026 19:19
@ivotron ivotron requested a review from Copilot April 30, 2026 21:16
@ivotron
Copy link
Copy Markdown
Member Author

ivotron commented Apr 30, 2026

@claude review once

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh to detect PR-only doc/GitHub workflow changes and upload either a dummy “pass” pipeline or the full testsuite pipeline.
  • Update .buildkite/pipeline.yml ci-entry-point step 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants