fix(relabel): sort labels before relabel.Process - #207
Open
fdegiuli wants to merge 1 commit into
Open
Conversation
Signed commits report1 of 1 commit between
This repository requires all commits to be signed. See GitHub docs on commit signature verification. |
|
|
|
Federico De Giuli seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
fdegiuli
force-pushed
the
fix_relabel
branch
2 times, most recently
from
August 28, 2026 19:07
c39e8b0 to
1d63d25
Compare
Author
|
I've signed the CLA three times now and it doesn't seem like bot is picking it up, btw. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
applyRelabelConfigsbuilds its input by ranging over amodel.LabelSet, which is amap, so the order is random.relabel.Processassumes sorted input when it resolvessource_labelsso on some orderings the lookup misses,resolves empty, and the rule silently no-ops.
Impact: any rule using
source_labelsis intermittently skipped, with no error — the target label is just absent.In our deployment this dropped
service_nameon ~30% of CloudWatch events.There's an existing comment in
main.gothat calls out this requirement, butbuilder.Sort()was never actually called.This PR just adds that missing call to
Sort()Added a tiny test that verifies the fix.
Likely also fixes #94 (labeldrop missing some matching labels)