-
Notifications
You must be signed in to change notification settings - Fork 3.5k
bk(smart exhaustive tests): tune the steps to support GH comments and changesets #18383
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
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
This pull request does not have a backport label. Could you fix it @v1v? 🙏
|
|
/run exhaustive tests |
|
/run exhaustive tests |
|
/run exhaustive tests |
1 similar comment
|
/run exhaustive tests |
|
/run exhaustive tests |
|
Changes caused https://buildkite.com/elastic/logstash-smart-exhaustive-tests-pipeline/builds/10 While github comment caused https://buildkite.com/elastic/logstash-smart-exhaustive-tests-pipeline/builds/11 |
|
/run exhaustive tests |
Warning: Checkout failed! checking out commit "ecdc1d984499a63372fcb8992c24864c80ab1e5b": exit status 128 (Attempt 3/3)
Test |
|
/run exhaustive tests |
|
/run exhaustive tests |
|
/run exhaustive tests |
|
/run exhaustive tests |
| commit: "${BUILDKITE_COMMIT}" | ||
| branch: "${BUILDKITE_BRANCH}" | ||
| commit: "HEAD" | ||
| branch: "pull/${BUILDKITE_PULL_REQUEST}/merge" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewer: BK PR bot ehaves awkwardly when supporting GitHub comments, and the previous approach did not work. Please refer to https://buildkite.com/elastic/logstash-exhaustive-tests-pipeline/builds/2815
2025-10-30 17:36:23 UTC | fatal: reference is not a tree: ecdc1d984499a63372fcb8992c24864c80ab1e5b
-- | --
| 2025-10-30 17:36:23 UTC | ⚠️ Warning: Checkout failed! checking out commit "ecdc1d984499a63372fcb8992c24864c80ab1e5b": exit status 128 (Attempt 3/3)
| 2025-10-30 17:36:23 UTC | 🚨 Error: checking out commit "ecdc1d984499a63372fcb8992c24864c80ab1e5b": exit status 128
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is odd. Seems like you found a decent workaround though.
| steps: | ||
| - label: "Trigger logstash-exhaustive-tests-pipeline for PRs with qa/acceptance/ changes" | ||
| if: build.pull_request.id != null | ||
| if: build.pull_request.id != null && build.env("GITHUB_PR_TRIGGER_COMMENT") != "/run exhaustive tests" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case of two events at the same time, a changeset and also a comment
| - ELASTIC_SLACK_NOTIFICATIONS_ENABLE=false | ||
| BUILDKITE_PULL_REQUEST: "${BUILDKITE_PULL_REQUEST}" | ||
| BUILDKITE_PULL_REQUEST_BASE_BRANCH: "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}" | ||
| ELASTIC_SLACK_NOTIFICATIONS_ENABLED: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
| BUILDKITE_PULL_REQUEST: "${BUILDKITE_PULL_REQUEST}" | ||
| BUILDKITE_PULL_REQUEST_BASE_BRANCH: "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewer: it requires this format, although, I tried to use the same as we have in other places, like beats and didn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A map of env var name with key and its value as the value makes sense
logstash/.buildkite/windows_jdk_matrix_pipeline.yml
Lines 4 to 5 in be64ebf
| DEFAULT_MATRIX_OS: "windows-2022" | |
| DEFAULT_MATRIX_JDK: "adoptiumjdk_21" |
| - GITHUB_PR_LABELS=${GITHUB_PR_LABELS} | ||
| - ELASTIC_SLACK_NOTIFICATIONS_ENABLE=false | ||
| BUILDKITE_PULL_REQUEST: "${BUILDKITE_PULL_REQUEST}" | ||
| ELASTIC_SLACK_NOTIFICATIONS_ENABLED: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
|
GH check failed because I cancelled a run related to the changeset by running a GitHub comment immediately after, https://buildkite.com/elastic/logstash-exhaustive-tests-pipeline/builds/2820 is running, but the GH check is not updated for some reason, maybe a race condition with the BK PR bot - where cancelled is happening after a new run instead of being sequential :/ |
💛 Build succeeded, but was flaky
Failed CI Steps
cc @v1v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you've got this working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Release notes
[rn:skip]
What does this PR do?
Validate the smart exhaustive tests pipeline works as expected
Why is it important/What is the impact to the user?
Avoid duplicated runs for changes in files and also a valid github comment.
Tune the configuration to run as requested
Checklist
Author's Checklist
How to test this PR locally
Related issues
Use cases
Important to highlight that the behaviour of the BK PR bot when running for push and comment events differ, hence the need to have two different implementations when triggering the exhaustive pipeline:
In addition, https://github.com/elastic/logstash/pull/18383/files#diff-37e558fe06dbd6c97017aa38d26835c3d4516285ee456dcda11c862715392d71R3 was required, for the same reason, if a GH comment is triggered and the last commit includes changes in the
qa/acceptancefolder, then it would have been triggered twice. That's an edge case I discovered and fixed with the above-mentioned line.Screenshots
Logs