diff --git a/.ci/scripts/resolve-dra-manifest.sh b/.ci/scripts/resolve-dra-manifest.sh index 4ac94122351aa..e42a22834cccb 100755 --- a/.ci/scripts/resolve-dra-manifest.sh +++ b/.ci/scripts/resolve-dra-manifest.sh @@ -30,7 +30,6 @@ if [ "$LATEST_VERSION" != "$ES_VERSION" ]; then fi echo "Using branch $NEW_BRANCH instead of $BRANCH." 1>&2 - echo "https://artifacts-$WORKFLOW.elastic.co/$ARTIFACT/latest/$NEW_BRANCH.json" LATEST_BUILD=$(fetch_build $WORKFLOW $ARTIFACT $NEW_BRANCH) fi diff --git a/docs/changelog/112713.yaml b/docs/changelog/112713.yaml new file mode 100644 index 0000000000000..1ccf451b13f82 --- /dev/null +++ b/docs/changelog/112713.yaml @@ -0,0 +1,5 @@ +pr: 112713 +summary: Fix encoding of dynamic arrays in ignored source +area: Logs +type: bug +issues: [] diff --git a/muted-tests.yml b/muted-tests.yml index cf4e519d78a17..1fe7cbb9540b3 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -178,8 +178,6 @@ tests: - class: org.elasticsearch.xpack.ml.integration.MlJobIT method: testPutJob_GivenFarequoteConfig issue: https://github.com/elastic/elasticsearch/issues/112382 -- class: org.elasticsearch.xpack.eql.EqlClientYamlIT - issue: https://github.com/elastic/elasticsearch/issues/112617 - class: org.elasticsearch.xpack.security.authc.kerberos.KerberosTicketValidatorTests method: testWhenKeyTabWithInvalidContentFailsValidation issue: https://github.com/elastic/elasticsearch/issues/112631 diff --git a/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java b/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java index 150b2b68cc018..bde583fddd914 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java @@ -646,7 +646,7 @@ private static void parseArrayDynamic(DocumentParserContext context, String curr context.addIgnoredField( IgnoredSourceFieldMapper.NameValue.fromContext( context, - currentFieldName, + context.path().pathAsText(currentFieldName), XContentDataHelper.encodeToken(context.parser()) ) ); diff --git a/server/src/test/java/org/elasticsearch/index/mapper/IgnoredSourceFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/IgnoredSourceFieldMapperTests.java index 61c4068cedf4a..a10b47cc06a73 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/IgnoredSourceFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/IgnoredSourceFieldMapperTests.java @@ -221,6 +221,18 @@ public void testMultipleIgnoredFieldsManyObjects() throws IOException { ); } + public void testIgnoredDynamicArrayNestedInObject() throws IOException { + int intValue = randomInt(); + + String syntheticSource = getSyntheticSourceWithFieldLimit(b -> { + b.startObject("bar"); + b.field("a", List.of(intValue, intValue)); + b.endObject(); + }); + assertEquals(String.format(Locale.ROOT, """ + {"bar":{"a":[%s,%s]}}""", intValue, intValue), syntheticSource); + } + public void testDisabledRootObjectSingleField() throws IOException { String name = randomAlphaOfLength(20); DocumentMapper documentMapper = createMapperService(topMapping(b -> { diff --git a/x-pack/plugin/eql/qa/rest/build.gradle b/x-pack/plugin/eql/qa/rest/build.gradle index d5b0cc42091f3..72f2a735eeb0a 100644 --- a/x-pack/plugin/eql/qa/rest/build.gradle +++ b/x-pack/plugin/eql/qa/rest/build.gradle @@ -30,6 +30,14 @@ tasks.named('yamlRestCompatTest') { usesDefaultDistribution() } +tasks.named("yamlRestTestV7CompatTransform").configure {task -> + task.skipTest("eql/10_basic/Execute EQL events query with wildcard (*) fields filtering.", "Change of locale with Java 23 makes these tests non deterministic") + task.skipTest("eql/10_basic/Execute EQL sequence with fields filtering.", "Change of locale with Java 23 makes these tests non deterministic") + task.skipTest("eql/10_basic/Execute EQL sequence with custom format for timestamp field.", "Change of locale with Java 23 makes these tests non deterministic") + task.skipTest("eql/10_basic/Execute EQL events query with fields filtering", "Change of locale with Java 23 makes these tests non deterministic") + task.skipTest("eql/10_basic/Execute EQL sequence with wildcard (*) fields filtering.", "Change of locale with Java 23 makes these tests non deterministic") +} + if (BuildParams.inFipsJvm){ // This test cluster is using a BASIC license and FIPS 140 mode is not supported in BASIC tasks.named("javaRestTest").configure{enabled = false }