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

Avoid parsing error when loading unknown scheduler job types #20302

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bernd
Copy link
Member

@bernd bernd commented Aug 29, 2024

This changes the fallback types in JobDefinitionConfig and JobTriggerData to not throw an error when parsing a database entry. We will log a warning instead when a fallback type is constructed.

/nocl No user-visible change

This changes the fallback types in JobDefinitionConfig and JobTriggerData
to not throw an error when parsing a database entry. We will log a
warning instead when a fallback type is constructed.
@bernd bernd requested a review from a team August 29, 2024 18:56
@bernd
Copy link
Member Author

bernd commented Aug 29, 2024

RFC: @Graylog2/architecture

With this change, we avoid errors when some code loads all job definitions or triggers and the collections contain outdated entries without subtype binding.

What do you think? If we want to merge this change, we should establish it as a generic pattern for our polymorphic types.

@thll
Copy link
Contributor

thll commented Sep 2, 2024

I think having a "fallback" config/type etc. suggests that this is meant to keep the system working in case an unknown type is encountered. If we wanted to fail fast in case an unknown type is encountered, we would just not provide a fallback config at all, right?

So yes, I think if a fallback config is provided, then it should handle the case gracefully as a general pattern.

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

Successfully merging this pull request may close these issues.

2 participants