Skip to content

Conversation

joegallo
Copy link
Contributor

@joegallo joegallo commented Aug 28, 2025

In the course of reviewing #133680, @jbaiera realized that there's an unrelated bug in the enrich processor.

The updated logic of the enrich processor from #124099 (released in 9.1.0) captures the project metadata, rather than the project id, which means that it doesn't see changes to the cluster state over time, including updates to the enrich index. As a consequence, executing an enrich policy wouldn't result in changes from the source index being reflected in the results of the enrich processor.

The fix here is to bind the project id and look up the project metadata.

@joegallo joegallo requested a review from jbaiera August 28, 2025 18:40
@joegallo joegallo added >bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team v9.2.0 v9.1.4 labels Aug 28, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @joegallo, I've created a changelog YAML for you.

Copy link
Member

@jbaiera jbaiera left a comment

Choose a reason for hiding this comment

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

LGTM, small question about test case

Comment on lines +42 to +43
// TODO Change this to run with security enabled
// https://github.com/elastic/elasticsearch/issues/75940
Copy link
Member

Choose a reason for hiding this comment

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

Should this new test be updated to run with security? If not, we should make sure to update #75940 with a check list item for this test

Copy link
Contributor Author

@joegallo joegallo Aug 28, 2025

Choose a reason for hiding this comment

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

👍, that's fair -- I'll add this one to the checklist for now, but separately take on the task of thinking about making these tests run with security. (edit: done, and promises made publicly #75940 (comment))

Copy link
Contributor

@nielsbauman nielsbauman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Joe! 🙏

@@ -0,0 +1,5 @@
pr: 133752
summary: Fix enrich fails to update when source changes
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: should we rephrase this to make it easier to understand and find for users? Perhaps something like: Avoid stale enrich cache results after policy is re-ran?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍, 253425b

@joegallo joegallo changed the title Fix enrich fails to update when source changes Avoid stale enrich results after policy execution Aug 28, 2025
@joegallo joegallo merged commit 3a7f712 into elastic:main Aug 28, 2025
33 checks passed
@joegallo joegallo deleted the enrich-source-change-bug branch August 28, 2025 20:48
joegallo added a commit to joegallo/elasticsearch that referenced this pull request Aug 28, 2025
@joegallo
Copy link
Contributor Author

#133762 is up for the backport (I forgot the dang label!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team v9.1.4 v9.2.0

4 participants