Skip to content

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Sep 27, 2025

Transport version generation relies on finding the original contents of transport resources before they may have been modified by the current branch. Currently it looks directly at the upstream main branch. Yet that means newly generated ids could leave holes if the branch is out of date with upstream main.

Instead, this commit now uses the merge base of the branch. The merge base is calculcated against upstream main. This allows generation to be locally consistent with the branch. The generated id may already be used on main, but that will be detected by a merge conflict in the upper bound before merging the PR. Additionally if in the middle of a merge, like with resolveTransportVersionConflict, the MERGE_HEAD is used as the base so that the regenerated ids will be based on the state at the end of the merge.

Transport version generation relies on finding the original contents of
transport resources before they may have been modified by the current
branch. Currently it looks directly at the upstream main branch. Yet
that means newly generated ids could leave holes if the branch is out of
date with upstream main.

Instead, this commit now uses the merge base of the branch. The merge
base is calculcated against upstream main. This allows generation to be
locally consistent with the branch. The generated id may already be used
on main, but that will be detected by a merge conflict in the upper
bound before merging the PR. Additionally if in the middle of a merge,
like with resolveTransportVersionConflict, the MERGE_HEAD is used as the
base so that the regenerated ids will be based on the state at the end
of the merge.
@rjernst rjernst requested a review from a team as a code owner September 27, 2025 03:52
@rjernst rjernst added :Core/Infra/Core Core issues without another label >refactoring auto-backport Automatically create backport pull requests when merged v8.19.5 v9.1.5 v8.18.8 v9.0.8 labels Sep 27, 2025
@elasticsearchmachine elasticsearchmachine added v9.2.0 Team:Core/Infra Meta label for core/infra team labels Sep 27, 2025
@elasticsearchmachine
Copy link
Collaborator

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

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.

2 participants