Skip to content

Validate tenantID on single resolver #6727

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

Conversation

SungJin1212
Copy link
Member

@SungJin1212 SungJin1212 commented Apr 29, 2025

Currently, a tenantID validation has been applied only for the MultiResolver.
This PR adds a validation of the tenantID to the single resolver. The validation rules follow the docs.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • [NA] Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Copy link
Member

@CharlieTLe CharlieTLe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 3, 2025
@SungJin1212 SungJin1212 requested a review from yeya24 May 21, 2025 01:06
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yeya24 yeya24 merged commit 5df4598 into cortexproject:master May 22, 2025
17 checks passed
@yeya24
Copy link
Contributor

yeya24 commented May 22, 2025

Btw I found this PR today #5676.

A tenant cannot use name __marker__ as well as it is reserved. We should probably update the doc

@SungJin1212
Copy link
Member Author

SungJin1212 commented May 23, 2025

@yeya24
Yeah, I will do. How about adding __markers__ tenantID check logic to resolver.go to emit an error? Currently, the user can push/query with tenantID __markers__ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants