Skip to content

feat(ci): support exhaustive tests for PRs (code changes or GH comment)#18327

Merged
v1v merged 3 commits into
elastic:mainfrom
v1v:feature/run-exhaustive-tests
Oct 30, 2025
Merged

feat(ci): support exhaustive tests for PRs (code changes or GH comment)#18327
v1v merged 3 commits into
elastic:mainfrom
v1v:feature/run-exhaustive-tests

Conversation

@v1v
Copy link
Copy Markdown
Member

@v1v v1v commented Oct 21, 2025

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

  • My code follows the style guidelines of this project
  • [ ] 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 works

How to test this PR locally

Add a path to always_require_ci_on_changed in pull-request.json for logstash-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-pipeline to actually filter:

  • code changes in the qa/acceptance folder
  • github comment

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.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@v1v v1v requested review from a team and donoghuc October 21, 2025 14:30
@v1v v1v self-assigned this Oct 21, 2025
@v1v v1v added the backport-skip Skip automated backport with mergify label Oct 21, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Oct 21, 2025

This pull request does not have a backport label. Could you fix it @v1v? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.
  • If no backport is necessary, please add the backport-skip label

Copy link
Copy Markdown
Contributor

@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n left a comment

Choose a reason for hiding this comment

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

LGTM in general. Just a little question

- ELASTIC_SLACK_NOTIFICATIONS_ENABLE=false

- label: "Trigger logstash-exhaustive-tests-pipeline for GitHub comments"
if: build.env("GITHUB_PR_TRIGGER_COMMENT") != ""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Two different events:

Each event should be treated independently.

Otherwise, what do you mean by your question?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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!

Copy link
Copy Markdown
Contributor

@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -0,0 +1,33 @@
steps:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

@donoghuc donoghuc left a comment

Choose a reason for hiding this comment

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

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]"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is "elastic-vault-github-plugin-prod[bot]" included here byt not for logstash-smart-exhaustive-tests-pipeline?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Comment thread .buildkite/pull-requests.json Outdated
Comment thread .buildkite/smart_exhaustive_tests_pipeline.yml
v1v and others added 2 commits October 29, 2025 19:35
Copy link
Copy Markdown
Member

@donoghuc donoghuc left a comment

Choose a reason for hiding this comment

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

🚀

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @v1v

@v1v v1v merged commit fc9ad7f into elastic:main Oct 30, 2025
11 checks passed
@v1v v1v mentioned this pull request Oct 30, 2025
5 tasks
donoghuc pushed a commit to donoghuc/logstash that referenced this pull request Oct 31, 2025
donoghuc added a commit that referenced this pull request Nov 1, 2025
* 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>
mergify Bot pushed a commit that referenced this pull request Nov 1, 2025
* 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)
mergify Bot pushed a commit that referenced this pull request Nov 1, 2025
* 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
donoghuc added a commit that referenced this pull request Nov 1, 2025
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip Skip automated backport with mergify

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants