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

[proemtheus-remote-write] fix label sorting #2078

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tals
Copy link

@tals tals commented Dec 1, 2023

Description

This is required by the spec
"MUST have label names sorted in lexicographical order."

This library would inject the __name__ label at the end. This broke the label ordering, leading Thanos to reject the write with a "409 Conflict" error.

Type of change

Please delete options that are not relevant.

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Unit test, and tested against a Thanos instance.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@tals tals requested a review from a team December 1, 2023 02:48
Copy link

linux-foundation-easycla bot commented Dec 1, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: tals / name: Tal Shiri (a695290)

@tals tals force-pushed the main branch 4 times, most recently from 32305a4 to 91634ca Compare December 1, 2023 02:54
This is required by the spec, and it is actively enforced by Thanos.
Without this, users hit a "409 Conflict" error
@ranvit
Copy link

ranvit commented Apr 23, 2024

+1 thanks for making this PR @tals
I had implemented the same fix on a fork and its been working well for me.

This is certainly a needed feature because Thanos chose to define and assert the missing remote-write spec - see here, one of the assertions being lexicographically sorted label names

cc'ing @lzchen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants