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