Skip to content

Conversation

jbaiera
Copy link
Member

@jbaiera jbaiera commented Nov 5, 2018

Allows build processes to pick up a qualifier to add into the version
at build time instead of depending on it from a version file. By
default, it will continue to use alpha1 as the qualifier until the ES
build changes the master branch to ship an unqualified snapshot version
during the 7 prerelease period.

Allows build processes to pick up a qualifier to add into the version
at build time instead of depending on it from a version file. By
default, it will continue to use alpha1 as the qualifier until the ES
build changes the master branch to ship an unqualified snapshot version
during the 7 prerelease period.
Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

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

Executed the branch code, and all looks good. Just a couple questions ...

compile name: "build-tools-${version}"
compile name: "build-tools-${esVersion}"
} else {
compile group: 'org.elasticsearch.gradle', name: 'build-tools', version: esVersion
Copy link
Contributor

Choose a reason for hiding this comment

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

This forces the qualified ES to exist in the remote repo prior to allowing this build to succeed... is that intentional ?
For example

./gradlew clean assemble -Dbuild.version_qualifier=alpha1 -Dbuild.snapshot=false

will not build until ES alpha1 (not snapshot) is available on the remote repo, in the prior version, it was controlled solely by the property which, (to me) is unclear if this is a change in the behavior/workflow for the release.

Copy link
Member Author

Choose a reason for hiding this comment

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

Further up in the script the localRepo variable is set from the system properties. The localRepo property is used to configure a local directory as a repository for resolving project dependencies. During the release process, Elasticsearch is built first and the resulting build tools artifact is copied to the localRepo directory in the ES-Hadoop project. This way ES-Hadoop can depend on the exact same artifact that will be released by the same build. Those setup steps and scripts are managed outside this script by the release automation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the explains!

String esVersion = props.getProperty('elasticsearch')

// TODO: This default should be removed when ES stops using alpha1 as its default qualifier
String qualifier = System.getProperty("build.version_qualifier", "alpha1")
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the release manager need to be aware of this system property ?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's a separate PR open for updating the release automation with the new qualifier code.

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

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

LGTM

@jbaiera
Copy link
Member Author

jbaiera commented Nov 5, 2018

Thanks @jakelandis!

@jbaiera jbaiera merged commit 76645cf into elastic:master Nov 5, 2018
@jbaiera jbaiera deleted the build-qualifiers branch November 5, 2018 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants