Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Saved Objects export fails for documents without an updated_at field #197282

Open
TinaHeiligers opened this issue Oct 22, 2024 · 2 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Saved Objects Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@TinaHeiligers
Copy link
Contributor

Exporting all saved objects fails if some objects don't have an updated_at field.

The saved object export API uses search_after where sort is based on updated_at field. If the export includes very old documents that were never updated, the bulk export can fail because updated_at is missing. The export API needs to be resilient against such an edge case.

@TinaHeiligers TinaHeiligers added bug Fixes for quality problems that affect the customer experience Feature:Saved Objects Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Oct 22, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@TinaHeiligers
Copy link
Contributor Author

TinaHeiligers commented Oct 23, 2024

Exporting all objects from SOM sets the default sort field as updated_at with direction desc. There doesn't seem to be an option to change that so we need a reasonable alternative for very old saved objects that don't have an updated_at field.
We need to add a fallback or choose a different sort field default or fallback to the exportByTypes implementation that uses byIdAscComparator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Saved Objects Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

2 participants