Skip to content

Conversation

mark-vieira
Copy link
Contributor

This registers a new PR job that ensures that any changes to transport versions to backport branches are also present in the main branch. This check does not run on the main branch itself.

@mark-vieira mark-vieira added :Core/Infra/Core Core issues without another label >refactoring auto-backport Automatically create backport pull requests when merged v9.2.0 v8.19.5 v9.1.5 v8.18.8 labels Sep 11, 2025
@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team v9.0.8 labels Sep 11, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@mark-vieira mark-vieira force-pushed the transport-version-backport-validation branch from 2fb9b0c to bfb97cf Compare September 11, 2025 16:49
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

Looks good, just minor questions/comments


# Get any changes in this pull request to transport definitions
git fetch origin "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}" --quiet
changed_files=$(git diff --name-only "origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}" | grep -E "server/src/main/resources/transport/definitions/.*\.csv" || true)
Copy link
Member

Choose a reason for hiding this comment

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

what does the "or true" do? Won't that make changed_files a boolean instead of a string list of changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the || true just ensures we always return a 0 exit code from that command since we have set pipefail. Otherwise if grep doesn't return any matches, we'll exit with a non-zero exit code, failing the job, which isn't what we want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To further clarify, the true utility doesn't produce any output. It simply always returns a 0 exit code. So in that scenario changed_files is still an empty string if there are no matches.

@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
main
8.19
9.1
8.18

mark-vieira added a commit to mark-vieira/elasticsearch that referenced this pull request Sep 12, 2025
mark-vieira added a commit to mark-vieira/elasticsearch that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Core/Infra/Core Core issues without another label >refactoring Team:Core/Infra Meta label for core/infra team v8.18.8 v8.19.5 v9.0.8 v9.1.5 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants