Graylog2 / Graylog2/graylog2-server

Pipeline rules breaking link to associated stages when renamed

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

Description

When changing the rule name in a pipeline rule it is not automatically updated on any stages that rule is associated with, instead the link is 'broken' in the pipeline stage. This does not seem correct when seemingly everywhere else in the graylog infrastructure a renamed object remains linked to any existing configurations.

## Expected Behavior
Changing a pipeline rule name should automatically update any linked stages with the new rule.

## Current Behavior
Changing a rule name silently breaks the association to existing rules:
"Rule [rule name] has been renamed or removed. This rule will be skipped."

## Possible Solution
Either provide a warning when saving a rule name on the pipeline rule editor that the rule is currently linked to $Stage.Name or prevent the rule name from being applied if it is currently attached to a stage(similarly to being prevented from removing streams associated with inputs?)

The best solution would be to silently update the existing reference from the old rule name to the new one on the pipeline stage associated with it. The user is already editing the rule associated with that stage and assumes the change will be reflected upstream.

## Steps to Reproduce (for bugs)
1. Create a pipeline rule and associate it to a stage
2. Update the pipeline rule code and change the rule name
3. Use the simulator to test your code changes, notice the changes are not reflected
4. Look at the stages in the pipelines and realize there is an error with the updated rule link.

## Context
I spent too long troubleshooting why new pipeline extractor rules were not functioning as expected while doing dynamic changes, not noticing that the rule I was editing was not actually associated to the pipeline stage as I expected anymore.

* Graylog Version: 3.0

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.