Skip to content

Commit

Permalink
Priorize snapshot builds in distribution downloader
Browse files Browse the repository at this point in the history
In the Security plugin's BWC tests there have been an issue with stale
artifacts, when troubleshooting we noticed that a release candidate for
OpenSearch 3.0.0 was being picked up in priority before the latest
snapshot build.  This was causing build failures preventing our tests
from running.

- Related opensearch-project/security#3020

Signed-off-by: Peter Nied <petern@amazon.com>
  • Loading branch information
peternied committed Jul 17, 2023
1 parent 688c53f commit d0d3f33
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,30 +181,30 @@ private static void setupDownloadServiceRepo(Project project) {
String distributionDownloadType = customDistributionDownloadType != null
&& customDistributionDownloadType.toString().equals("bundle") ? "bundle" : "min";
if (customDistributionUrl != null) {
addIvyRepo(project, DOWNLOAD_REPO_NAME, customDistributionUrl.toString(), FAKE_IVY_GROUP, "");
addIvyRepo(project, SNAPSHOT_REPO_NAME, customDistributionUrl.toString(), FAKE_SNAPSHOT_IVY_GROUP, "");
addIvyRepo(project, DOWNLOAD_REPO_NAME, customDistributionUrl.toString(), FAKE_IVY_GROUP, "");
return;
}
switch (distributionDownloadType) {
case "bundle":
addIvyRepo(project, DOWNLOAD_REPO_NAME, "https://ci.opensearch.org", FAKE_IVY_GROUP, BUNDLE_PATTERN_LAYOUT);
addIvyRepo(project, SNAPSHOT_REPO_NAME, "https://ci.opensearch.org", FAKE_SNAPSHOT_IVY_GROUP, BUNDLE_PATTERN_LAYOUT);
addIvyRepo(project, DOWNLOAD_REPO_NAME, "https://ci.opensearch.org", FAKE_IVY_GROUP, BUNDLE_PATTERN_LAYOUT);

Check warning on line 191 in buildSrc/src/main/java/org/opensearch/gradle/DistributionDownloadPlugin.java

View check run for this annotation

Codecov / codecov/patch

buildSrc/src/main/java/org/opensearch/gradle/DistributionDownloadPlugin.java#L191

Added line #L191 was not covered by tests
break;
case "min":
addIvyRepo(
project,
DOWNLOAD_REPO_NAME,
SNAPSHOT_REPO_NAME,
"https://artifacts.opensearch.org",
FAKE_IVY_GROUP,
"/releases" + RELEASE_PATTERN_LAYOUT,
"/release-candidates" + RELEASE_PATTERN_LAYOUT
FAKE_SNAPSHOT_IVY_GROUP,
SNAPSHOT_PATTERN_LAYOUT
);
addIvyRepo(
project,
SNAPSHOT_REPO_NAME,
DOWNLOAD_REPO_NAME,
"https://artifacts.opensearch.org",
FAKE_SNAPSHOT_IVY_GROUP,
SNAPSHOT_PATTERN_LAYOUT
FAKE_IVY_GROUP,
"/releases" + RELEASE_PATTERN_LAYOUT,
"/release-candidates" + RELEASE_PATTERN_LAYOUT
);
break;
default:
Expand Down

0 comments on commit d0d3f33

Please sign in to comment.