Skip to content

Conversation

@v1v
Copy link
Member

@v1v v1v commented Oct 30, 2025

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

  • 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

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/acceptance folder, then it would have been triggered twice. That's an edge case I discovered and fixed with the above-mentioned line.

Screenshots

Logs

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2025

🤖 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!)
  • /run exhaustive tests : Run the exhaustive tests Buildkite pipeline.

@mergify
Copy link
Contributor

mergify bot commented Oct 30, 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

@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

1 similar comment
@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

Warning: Checkout failed! checking out commit "ecdc1d984499a63372fcb8992c24864c80ab1e5b": exit status 128 (Attempt 3/3)
@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

@v1v v1v changed the title chore: test bk(smart exhaustive tests): configure the steps to run as requested Oct 30, 2025
@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

/run exhaustive tests

commit: "${BUILDKITE_COMMIT}"
branch: "${BUILDKITE_BRANCH}"
commit: "HEAD"
branch: "pull/${BUILDKITE_PULL_REQUEST}/merge"
Copy link
Member Author

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

Copy link
Member

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

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
Copy link
Member Author

Choose a reason for hiding this comment

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

typo

Comment on lines +19 to +20
BUILDKITE_PULL_REQUEST: "${BUILDKITE_PULL_REQUEST}"
BUILDKITE_PULL_REQUEST_BASE_BRANCH: "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}"
Copy link
Member Author

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.

Copy link
Member

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

DEFAULT_MATRIX_OS: "windows-2022"
DEFAULT_MATRIX_JDK: "adoptiumjdk_21"
over a list of string. Good with this.

- GITHUB_PR_LABELS=${GITHUB_PR_LABELS}
- ELASTIC_SLACK_NOTIFICATIONS_ENABLE=false
BUILDKITE_PULL_REQUEST: "${BUILDKITE_PULL_REQUEST}"
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: false
Copy link
Member Author

Choose a reason for hiding this comment

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

typo

@v1v v1v changed the title bk(smart exhaustive tests): configure the steps to run as requested bk(smart exhaustive tests): tune the steps to support GH comments and changesets Oct 30, 2025
@v1v v1v self-assigned this Oct 30, 2025
@v1v v1v added the backport-skip Skip automated backport with mergify label Oct 30, 2025
@v1v
Copy link
Member Author

v1v commented Oct 30, 2025

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 :/

@v1v v1v marked this pull request as ready for review October 30, 2025 18:06
@v1v v1v requested a review from a team October 30, 2025 18:07
@elasticmachine
Copy link
Collaborator

Copy link
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.

Looks like you've got this working

Copy link
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

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