From fa95474ab89271a61c7ca47292bb62139323adbe Mon Sep 17 00:00:00 2001 From: David Roberts Date: Fri, 19 May 2017 13:36:40 +0100 Subject: [PATCH] [BUILD] Change ordering of Java compilation and ML C++ notice extraction May help to avoid problems with the speed of temporary AWS credentials propagation (see elastic/x-pack-logstash#73) Original commit: elastic/x-pack-elasticsearch@c78e00cda51ef35d9dd75fb88af18dc2dc578e57 --- plugin/build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/build.gradle b/plugin/build.gradle index 88c3d0404bd..d19856c4efc 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -117,7 +117,7 @@ Closure setAwsCreds = { break; } catch (AmazonServiceException e) { if (e.getStatusCode() != 403 || retries == 0) { - throw new GradleException('Could not access ml-cpp artifacts. Timed out after 60 attempts', e) + throw new GradleException('Could not access ml-cpp artifacts. Timed out after 60 seconds', e) } } sleep(500) @@ -279,6 +279,10 @@ forbiddenPatterns { task extractNativeLicenses(type: Copy) { into "${buildDir}" include 'platform/licenses/**' + // This is to reduce the risk of credentials used to access the native bundle not + // having propagated throughout AWS by the time it's downloaded; the time needed + // to compile the Java is extra time during which the propagation can take place + shouldRunAfter compileJava } // TODO: standardize packaging config for plugins