Skip to content

Commit

Permalink
[ML] Mark ml-cpp dependency as regularly changing (elastic#43760)
Browse files Browse the repository at this point in the history
Since elastic#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.
  • Loading branch information
droberts195 committed Jun 28, 2019
1 parent ac9cd1b commit 3cee606
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x-pack/plugin/ml/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ configurations {
substitute module("org.elasticsearch.ml:ml-cpp") with project(":ml-cpp")
}
}
resolutionStrategy.cacheChangingModulesFor 2, 'hours'
}
}

Expand Down Expand Up @@ -62,7 +63,9 @@ dependencies {
compile project(':libs: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'
}

Expand Down

0 comments on commit 3cee606

Please sign in to comment.