Skip to content

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Sep 19, 2025

For most devs the default of finding the elastic remote and the main branch of that remote is the right upstream ref. But for tests that operate on fake or local repositories it's useful to be able to override the ref. This commit adds a parameter to the transport version resources allowing to override the ref used to look at upstream.

For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
@rjernst rjernst added the :Core/Infra/Core Core issues without another label label Sep 19, 2025
@rjernst rjernst requested a review from a team as a code owner September 19, 2025 22:25
@rjernst rjernst added >refactoring auto-backport Automatically create backport pull requests when merged v8.19.5 v9.1.5 v8.18.8 v9.0.8 labels Sep 19, 2025
@elasticsearchmachine elasticsearchmachine added v9.2.0 Team:Core/Infra Meta label for core/infra team labels Sep 19, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@rjernst rjernst changed the title Allow overriding upstream ref Allow overriding upstream ref in transport version build logic Sep 19, 2025
Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

I actually had a question for Rene, but this LGTM as-is.

Directory transportResources = project.getLayout().getProjectDirectory().dir("src/main/resources/" + resourceRoot);
spec.getParameters().getTransportResourcesDirectory().set(transportResources);
spec.getParameters().getRootDirectory().set(project.getLayout().getSettingsDirectory().getAsFile());
Object upstreamRef = project.findProperty("org.elasticsearch.transport.upstreamRef");
Copy link
Contributor

Choose a reason for hiding this comment

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

@breskeby is using project.getProviders().gradleProperty() preferable wrt to configuration caching or any of that?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I think we should use project.getProviders().gradleProperty() here indeed.

Copy link
Contributor

@breskeby breskeby left a comment

Choose a reason for hiding this comment

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

other than what mark suggested (project.getProviders().gradleProperty()) this lgtm. can fix in a follow up if urgent

@rjernst
Copy link
Member Author

rjernst commented Sep 22, 2025

I'll do that in a followup since we have another use of findProperty

@rjernst rjernst merged commit e9ae5ea into elastic:main Sep 22, 2025
35 checks passed
@rjernst rjernst deleted the transport/resources_main_ref branch September 22, 2025 14:54
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.19
9.1
8.18
9.0

elasticsearchmachine pushed a commit that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
elasticsearchmachine pushed a commit that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
elasticsearchmachine pushed a commit that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
elasticsearchmachine pushed a commit that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
DonalEvans pushed a commit to DonalEvans/elasticsearch that referenced this pull request Sep 22, 2025
For most devs the default of finding the elastic remote and the main
branch of that remote is the right upstream ref. But for tests that
operate on fake or local repositories it's useful to be able to override
the ref. This commit adds a parameter to the transport version resources
allowing to override the ref used to look at upstream.
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.

4 participants