graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

Avoid parsing error when loading unknown scheduler job types

Open bernd opened this issue 1 year ago • 2 comments

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

bernd avatar Aug 29 '24 18:08 bernd

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.

bernd avatar Aug 29 '24 18:08 bernd

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.

thll avatar Sep 02 '24 09:09 thll