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

JobDefinitionService.getByConfigField() is not working correctly if two dfferent config types have the same field.

Open janheise opened this issue 3 months ago • 0 comments

Expected Behavior

You can load a JobDefinition by the contents of a config field. It this field is not unique over all JobDefinition types, you can end up with the wrong JobDefinition. I think the query should also take the JobDefinition type into account.

see https://github.com/Graylog2/graylog2-server/blob/b241dd03999bc44e30f417ad82df724397990a72/graylog2-server/src/main/java/org/graylog/scheduler/DBJobDefinitionService.java#L61

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Graylog Version:
  • Java Version:
  • OpenSearch Version:
  • MongoDB Version:
  • Operating System:
  • Browser version:

janheise avatar May 08 '24 10:05 janheise