Skip to content

relabel: default value for source_labels should be nil and not empty slice#5059

Merged
kalleep merged 2 commits intomainfrom
kalleep/fix-relabel-defaults
Dec 11, 2025
Merged

relabel: default value for source_labels should be nil and not empty slice#5059
kalleep merged 2 commits intomainfrom
kalleep/fix-relabel-defaults

Conversation

@kalleep
Copy link
Contributor

@kalleep kalleep commented Dec 10, 2025

PR Description

Seems like latest prometheus update relabel rules are now validated when with scrape config. When we translate our internal structure we did not generate valid rules for e.g. e.g. labeldrop. This affects at least prometheus.operator.* but maybe more?

We need to set source_labels to nil and not empty slice.

Which issue(s) this PR fixes

Fixes: #4992

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@kalleep kalleep requested a review from a team as a code owner December 10, 2025 15:36
@kalleep kalleep force-pushed the kalleep/fix-relabel-defaults branch from c540ded to 3be3b1b Compare December 11, 2025 08:13
@kalleep kalleep merged commit d385cba into main Dec 11, 2025
50 of 52 checks passed
@kalleep kalleep deleted the kalleep/fix-relabel-defaults branch December 11, 2025 08:38
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ServiceMonitors broken in v1.12.0 with labeldrop rule

2 participants