Skip to content
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

Ruler: Refactoring remote-write config overrides #4429

Merged
merged 4 commits into from
Oct 7, 2021

Conversation

dannykopping
Copy link
Contributor

What this PR does / why we need it:
Removes mergo.Merge because it does not perform the way we would like. More details in #4428.

Which issue(s) this PR fixes:
Fixes #4428

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated

Danny Kopping added 2 commits October 7, 2021 10:37
Replacing mergo.Merge because it cannot distinguish between a nil and an empty slice, which is needed to overwrite relabel configs

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Adding extra check for header smuggling

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@dannykopping dannykopping marked this pull request as ready for review October 7, 2021 10:04
@dannykopping dannykopping requested a review from a team as a code owner October 7, 2021 10:04
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@owen-d owen-d merged commit a961612 into grafana:main Oct 7, 2021
@dannykopping dannykopping deleted the dannykopping/fix-overrides branch October 7, 2021 14:25
dannykopping pushed a commit that referenced this pull request Oct 8, 2021
* Refactoring remote-write config overrides

Replacing mergo.Merge because it cannot distinguish between a nil and an empty slice, which is needed to overwrite relabel configs

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>

* Simplifying condition

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>

* Merging headers instead of overwriting blindly

Adding extra check for header smuggling

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>

* Unexporting OverwriteMarshalingStringMap field, preferring constructor

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ruler: write relabel rules are not applied correctly
2 participants