-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Add explicit versions in the branches.json and use them for calculating unreleased versions for BwC tests #129637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
1e1a591
to
d84fef9
Compare
|
||
@TaskAction | ||
public void executeTask() throws IOException { | ||
File branchesFile = new File(Util.locateElasticsearchWorkspace(project.getGradle()), "branches.json"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
referencing project
here while executing task is deprecated. In this case I think we should just inject ProjectLayout
instead of project in the ctor and then use layout.getSettingsDirectory().file('branches.json').asFile
.
The Util.locateElasticsearchWorkspace
is just a utility method only used to resolve files relateive from internal builds within this repository, which we don't need here as we never run this task anywhere else but in the :elasticsearch root build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we probably want to make this file an outputFile property of the task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now changed the way to reference branches.json
file location using ProjectLayout
and also made the branches file an @OutputFile
property of the task.
private final ObjectMapper objectMapper; | ||
private final BranchesFileParser branchesFileParser; | ||
|
||
@Nullable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made all three parameters @Input
and @Optional
.
4d569dc
to
1e2fb07
Compare
1e2fb07
to
022297f
Compare
# Conflicts: # branches.json
By default, it now reads branches.json from main branch of Elasticsearch (through GitHub raw link) . This can be overridden for testing or when there is a problem with remote call.
022297f
to
4d3aa2f
Compare
There is still a problem with |
Work in progress
Gradle task added to modify
branches.json
. Possibility to add, remove and update branches in the file with theversion
field added next to thebranch
.After the change the file looks like this:
BwC test configuration has been changed to use changed
branches.json
file to calculate unreleased ES versions, instead of combining data fromVersion.java
andbranches.json
.