Skip to content

Conversation

seanzatzdev
Copy link
Contributor

@seanzatzdev seanzatzdev commented Oct 16, 2025

One of the methods used for generating field paths in tests has a bug that can occur which will generate empty path segments due to randomly generated strings that include . values.

e.g.

1> [2025-10-17T07:05:23,431][INFO ][o.e.i.c.AppendProcessorTests][testAppendValuesToExistingList] [seed=[622839918FFAD261:E8D31C04FD5E16CA]] after test
  2> REPRODUCE WITH: ./gradlew ":modules:ingest-common:test" --tests "org.elasticsearch.ingest.common.AppendProcessorTests.testAppendValuesToExistingList {seed=[622839918FFAD261:E8D31C04FD5E16CA]}" -Dtests.seed=622839918FFAD261 -Dtests.locale=sa -Dtests.timezone=Pacific/Kanton -Druntime.java=25
  2> java.lang.IllegalArgumentException: path [𹡹.MC..񗃹𝮠𚰉񈌇򂦕򆿰.7VQ] is not valid
        at __randomizedtesting.SeedInfo.seed([622839918FFAD261:E8D31C04FD5E16CA]:0)
        at org.elasticsearch.ingest.IngestDocument$FieldPath.validateClassicFields(IngestDocument.java:1412)
        at org.elasticsearch.ingest.IngestDocument$FieldPath.processPathParts(IngestDocument.java:1397)
        at org.elasticsearch.ingest.IngestDocument$FieldPath.<init>(IngestDocument.java:1392)
        at org.elasticsearch.ingest.IngestDocument$FieldPath.of(IngestDocument.java:1366)
        at org.elasticsearch.ingest.IngestDocument.setFieldValue(IngestDocument.java:754)
        at org.elasticsearch.ingest.IngestDocument.setFieldValue(IngestDocument.java:694)
        at org.elasticsearch.ingest.RandomDocumentPicks.addRandomField(RandomDocumentPicks.java:108)
        at org.elasticsearch.ingest.common.AppendProcessorTests.testAppendValuesToExistingList(AppendProcessorTests.java:50)
  2> NOTE: leaving temporary files on disk at: /Users/seanzatz/workspace/elasticsearch/modules/ingest-common/build/testrun/test/temp/org.elasticsearch.ingest.common.AppendProcessorTests_622839918FFAD261-001
  2> NOTE: test params are: codec=Asserting(Lucene103): {}, docValues:{}, maxPointsInLeafNode=774, maxMBSortInHeap=6.044067774802311, sim=Asserting(RandomSimilarity(queryNorm=true): {}), locale=sa, timezone=Pacific/Kanton
  2> NOTE: Mac OS X 15.7.1 aarch64/Oracle Corporation 25 (64-bit)/cpus=12,threads=1,free=425678512,total=536870912
  2> NOTE: All tests run in this JVM: [AppendProcessorTests]

This PR updates the method logic to only generate valid paths via using a method which excludes . values

Closes #136701

@seanzatzdev seanzatzdev reopened this Oct 16, 2025
@seanzatzdev seanzatzdev marked this pull request as ready for review October 16, 2025 21:39
@seanzatzdev seanzatzdev requested a review from a team October 16, 2025 21:39
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Oct 16, 2025
@seanzatzdev seanzatzdev added :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >test Issues or PRs that are addressing/adding tests labels Oct 16, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Oct 16, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Oct 16, 2025
@joegallo joegallo self-requested a review October 16, 2025 21:45
Copy link
Contributor

@szybia szybia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Contributor

@joegallo joegallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for iterating with us. Ship it!

@seanzatzdev seanzatzdev enabled auto-merge (squash) October 17, 2025 18:14
@seanzatzdev seanzatzdev merged commit f76e3fb into elastic:main Oct 17, 2025
34 checks passed
@seanzatzdev seanzatzdev deleted the fix-test-field-names-function branch October 17, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team >test Issues or PRs that are addressing/adding tests v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

org.elasticsearch.ingest.common.AppendProcessorTests.testCopyFromOtherField very very rare failure

4 participants