-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update default pipeline when inputs are renamed or deleted #21541
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A stream can also be renamed. Did you plan to implement the handling of stream renaming in another PR, or is it easier to implement it in this one?
...g2-server/src/test/java/org/graylog/plugins/pipelineprocessor/rest/PipelineResourceTest.java
Outdated
Show resolved
Hide resolved
import static org.mockito.Mockito.verify; | ||
import static org.mockito.Mockito.when; | ||
|
||
class InputRoutingServiceTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding @ExtendWith(MockitoExtension.class)
would detect unnecessary stubbing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I expected the compiler or Sonar linter to alert me, but they didn't.
Strangely, adding the ExtendWith
statement did not result in unused stubs being flagged; neither did adding the STRICT_SUBS
setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't mean that there is currently unnecessary stubbing in the test class. I just wanted to point out that it is always good to have this annotation so that Mockito can recognize unnecessary stubbing.
Confirmed with @tellistone that we are not auto-updating rules for stream rename/delete. Users will have to manually delete obsolete rules. |
/nocl new feature
Resolves Graylog2/graylog-plugin-enterprise/issues/9591
See related issue for details
We also change the pattern for generated rule names to include the human readable input title while retaining the input ID for uniqueness.
How Has This Been Tested?
Unit tests and local ad hoc testing: