[Fleet] Add data stream API tests for cases where event.ingested
is not set
#135858
Labels
Team:Fleet
Team label for Observability Data Collection Fleet team
In #135817, we fixed a bug caused by
event.ingested
being unset in some data stream documents for cloud environments. Some additional testing revealed that this is potentially because enterprise search documents are ingested in Cloud before the.fleet-final-pipeline
ingest pipeline is installed, e.g.Show code block
The missing
event.ingested
field caused issues when we fetched data streams in Fleet's API, so we introduced a guard clause here. However, we're lacking in test coverage for this case.Adding tests for this is difficult, however, because we need to ingest data stream documents without Fleet's
.fleet-final-pipeline
adding theevent.ingested
field, or we need to manually delete that field. I spent a few hours trying to get that work in the data stream API integration tests without much luck.It'd be great to get some test coverage for this case, or further investigate the issue causing enterprise search data to be ingested before Fleet's ingest pipeline can process the data.
The text was updated successfully, but these errors were encountered: