From 7951c63b919d97a1a64e8f8abd7f64a8a14c49c9 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Fri, 28 Jun 2019 20:06:22 +0100 Subject: [PATCH] [ML] Mark ml-cpp dependency as regularly changing (#43760) Since #41817 was merged the ml-cpp zip file for any given version has been cached indefinitely by Gradle. This is problematic, particularly in the case of the master branch where the version 8.0.0-SNAPSHOT will be in use for more than a year. This change tells Gradle that the ml-cpp zip file is a "changing" dependency, and to check whether it has changed every two hours. Two hours is a compromise between checking on every build and annoying developers with slow internet connections and checking rarely causing bug fixes in the ml-cpp code to take a long time to propagate through to elasticsearch PRs that rely on them. --- x-pack/plugin/ml/build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/ml/build.gradle b/x-pack/plugin/ml/build.gradle index 660a09c6b94..82c7b138ec9 100644 --- a/x-pack/plugin/ml/build.gradle +++ b/x-pack/plugin/ml/build.gradle @@ -31,6 +31,7 @@ configurations { substitute module("org.elasticsearch.ml:ml-cpp") with project(":ml-cpp") } } + resolutionStrategy.cacheChangingModulesFor 2, 'hours' } } @@ -59,7 +60,9 @@ dependencies { compile project(':libs:elasticsearch-grok') compile "com.ibm.icu:icu4j:${versions.icu4j}" compile "net.sf.supercsv:super-csv:${versions.supercsv}" - nativeBundle "org.elasticsearch.ml:ml-cpp:${project.version}@zip" + nativeBundle("org.elasticsearch.ml:ml-cpp:${project.version}@zip") { + changing = true + } testCompile 'org.ini4j:ini4j:0.5.2' }