feat(ci): support exhaustive tests for PRs (code changes or GH comment)#18327
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? 🙏
|
| - ELASTIC_SLACK_NOTIFICATIONS_ENABLE=false | ||
|
|
||
| - label: "Trigger logstash-exhaustive-tests-pipeline for GitHub comments" | ||
| if: build.env("GITHUB_PR_TRIGGER_COMMENT") != "" |
There was a problem hiding this comment.
What happens if a file has changed in the qa/acceptance/ and a comment in the PR is made?
will be the pipeline logstash-exhaustive-tests-pipeline executed twice?
There was a problem hiding this comment.
Two different events:
- push event with the file changeset
- github comment matches the values in https://github.com/elastic/logstash/pull/18327/files#diff-646855f9c36bcc3f7a5c49c1fa33be9b7771d99e5e2219332b215eaac6e51537R20-R21
Each event should be treated independently.
Otherwise, what do you mean by your question?
There was a problem hiding this comment.
Understood. We want to execute the tests in both cases and every time when push and the right files have changed or when a comment that matches has made.
Thanks!
| @@ -0,0 +1,33 @@ | |||
| steps: | |||
There was a problem hiding this comment.
As long as the BK pr bot does not support running the very first build for PRs. We use this intermediate pipeline. This will help with running faster builds regardless, although it adds the complexity for maintaining a new pipeline.
donoghuc
left a comment
There was a problem hiding this comment.
As someone who often uses buildkite UI to go and kick off a PR build, i'm a HUGE fan of the GH comment trigger. That will be a huge help.
I'm a bit more neutral on the file watch trigger, but i dont think it will hurt anything and it establishes a nice pattern for doing that for the future.
Have a few non-critical clarifying questions and suggestions but i'm a massive plus one on this. Thanks!
| "dependabot[bot]", | ||
| "mergify[bot]", | ||
| "github-actions[bot]", | ||
| "elastic-vault-github-plugin-prod[bot]" |
There was a problem hiding this comment.
Why is "elastic-vault-github-plugin-prod[bot]" included here byt not for logstash-smart-exhaustive-tests-pipeline?
There was a problem hiding this comment.
It was already there, no idea the rationale, but I think we don't need it in this case in the new pipeline.
That's the GH ephemeral token app. I don't think PRs created by that user affect any files that could trigger lostash-smart-exhaustive-tests-pipeline.
Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
💚 Build Succeeded
History
cc @v1v |
* feat(ci): support exhaustive tests for PRs (code changes or GH comment) (#18327) * bk: fix regex and add new file (#18382) * bk(smart exhaustive tests): tune the steps to support GH comments and changesets (#18383) * chore: remove test file for exhaustive tests and normalise github commands (#18384) --------- Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
* feat(ci): support exhaustive tests for PRs (code changes or GH comment) (#18327) * bk: fix regex and add new file (#18382) * bk(smart exhaustive tests): tune the steps to support GH comments and changesets (#18383) * chore: remove test file for exhaustive tests and normalise github commands (#18384) --------- Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com> (cherry picked from commit 906d5bd)
* feat(ci): support exhaustive tests for PRs (code changes or GH comment) (#18327) * bk: fix regex and add new file (#18382) * bk(smart exhaustive tests): tune the steps to support GH comments and changesets (#18383) * chore: remove test file for exhaustive tests and normalise github commands (#18384) --------- Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com> (cherry picked from commit 906d5bd) # Conflicts: # .buildkite/pull-requests.json
* feat(ci): support exhaustive tests for PRs (code changes or GH comment) (#18327) * bk: fix regex and add new file (#18382) * bk(smart exhaustive tests): tune the steps to support GH comments and changesets (#18383) * chore: remove test file for exhaustive tests and normalise github commands (#18384) --------- (cherry picked from commit 906d5bd) Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com> Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Release notes
rn:skip
What does this PR do?
This pull request introduces a new "smart exhaustive tests" pipeline for Logstash, integrating it into the Buildkite CI configuration and documenting it in the service catalog. The main goal is to trigger exhaustive test runs automatically for pull requests that modify files in the
qa/acceptance/directory or when specific GitHub comments are made, improving test coverage and automation for critical changes.Why is it important/What is the impact to the user?
Test the code that will rarely impact the standard PR test suite, but will exercise the acceptance tests.
Checklist
[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variables)[ ] I have added tests that prove my fix is effective or that my feature worksHow to test this PR locally
Add a path to
always_require_ci_on_changedin pull-request.json forlogstash-smart-exhaustive-tests-pipeline, then apply changes in that directory, commit and push. That will trigger the exhaustive tests pipeline in Buildkite.Caveats
The existing BK PR Bot does not support for code changes and GitHub comments, without running the first buidl when a PR is created.
That's the reason for creating the
logstash-smart-exhaustive-tests-pipelineto actually filter:This should help with running faster builds and reduce the overhead of running the exhaustive tests for the first build of each new PR.
Duplicates #18202, that I messed up with the rebase.