Skip to content

Commit 715b595

Browse files
committed
Scripting: fix generateContextDoc path and url elastic#59676
* Add doc runtime class path * Use getAllHttpSocketURI.get(0) instead of getAllHttpSocketURI to get a single test cluster URL rather than a list Backport: 3057e0f
1 parent da85a40 commit 715b595

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

modules/lang-painless/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ testClusters {
9797
}
9898

9999
task generateContextDoc(type: DefaultTestClustersTask) {
100+
dependsOn sourceSets.doc.runtimeClasspath
100101
useCluster testClusters.generateContextCluster
101102
doFirst {
102103
project.javaexec {
103104
main = 'org.elasticsearch.painless.ContextDocGenerator'
104105
classpath = sourceSets.doc.runtimeClasspath
105-
systemProperty "cluster.uri", "${-> testClusters.generateContextCluster.singleNode().getAllHttpSocketURI()}"
106+
systemProperty "cluster.uri", "${-> testClusters.generateContextCluster.singleNode().getAllHttpSocketURI().get(0)}"
106107
}.assertNormalExitValue()
107108
}
108109
}

modules/lang-painless/src/doc/java/org/elasticsearch/painless/ContextDocGenerator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,11 @@ private static boolean isInternalClass(String javaName) {
801801
javaName.equals("org.elasticsearch.xpack.sql.expression.function.scalar.geo.GeoShape") ||
802802
javaName.equals("org.elasticsearch.xpack.sql.expression.function.scalar.whitelist.InternalSqlScriptUtils") ||
803803
javaName.equals("org.elasticsearch.xpack.sql.expression.literal.IntervalDayTime") ||
804-
javaName.equals("org.elasticsearch.xpack.sql.expression.literal.IntervalYearMonth");
804+
javaName.equals("org.elasticsearch.xpack.sql.expression.literal.IntervalYearMonth") ||
805+
javaName.equals("org.elasticsearch.xpack.eql.expression.function.scalar.whitelist.InternalEqlScriptUtils") ||
806+
javaName.equals("org.elasticsearch.xpack.ql.expression.function.scalar.InternalQlScriptUtils") ||
807+
javaName.equals("org.elasticsearch.xpack.ql.expression.function.scalar.whitelist.InternalQlScriptUtils") ||
808+
javaName.equals("org.elasticsearch.script.ScoreScript$ExplanationHolder");
805809
}
806810

807811
private ContextDocGenerator() {

0 commit comments

Comments
 (0)