-
Notifications
You must be signed in to change notification settings - Fork 64
Description
What is the bug?
OpenSearch version check logic on 1.x branch is impossible to meet both cases.
main branch:
buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
}1.x branch:
buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.9.0")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
if (isSnapshot) {
opensearch_version += "-SNAPSHOT"
}
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
}
The released version is always a version behind the snapshot version (for example, 2.9.0 is released, 2.10.0-SNAPSHOT is latest).
How can one reproduce the bug?
Run a github action requiring 2.10.0 changes: it fails with current code (above) but if we just change version to 2.10.0, then there is no such release that it will ever build against (until the 2.10.0 release, at which time we'll have 2.11.0-SNAPSHOT).
What is the expected behavior?
1.x actions build against the latest snapshot version
Do you have any additional context?
See for example https://github.com/opensearch-project/opensearch-sdk-java/actions/runs/5741412861/job/15561744611?pr=920
I believe there are version options such as "2+" that will get the latest 2.x version, and that can be filtered to allow or exclude snapshots.