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

fix: catch errors when updating the mappings on startup #338

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

Kuruyia
Copy link

@Kuruyia Kuruyia commented Apr 3, 2024

What does this PR do ?

Currently, KDM crashes the Kuzzle instance on startup when it fails to update the mapping of an engine collection to match the models that are stored in the database, making it impossible for someone to fix the models without connecting directly to the Elasticsearch database.

This fixes this crash by adding a try-catch block when the engines are updated on startup to notify the user that a problem occurred instead. Various try-catch blocks were also added on the collection creation methods to provide more context on where the error occurred.

This is associated with JIRA ticket KZLPRD-220.

@Kuruyia Kuruyia added the bug Something isn't working label Apr 3, 2024
@Kuruyia Kuruyia self-assigned this Apr 3, 2024
@Kuruyia Kuruyia merged commit e3c3353 into 2-dev Apr 8, 2024
3 checks passed
@Kuruyia Kuruyia deleted the fix/mapping-startup-crash branch April 8, 2024 12:22
github-actions bot pushed a commit that referenced this pull request Apr 9, 2024
# [2.4.0-beta.16](v2.4.0-beta.15...v2.4.0-beta.16) (2024-04-09)

### Bug Fixes

* catch errors when updating the mappings on startup ([#338](#338)) ([e09c5a3](e09c5a3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants