Graylog2 / Graylog2/graylog2-server

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

Open
#19,292 0 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## 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)

1.
2.
3.
4.

## Context

## Your Environment

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.