-
Notifications
You must be signed in to change notification settings - Fork 816
Query Federation Incorrectly Returns Series for Wrong Tenant with __tenant_id__ Label Matcher #5941
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
Comments
Thanks for reporting it. I will try to take a look ASAP. Meanwhile if feel free to open a PR with a fix if you want. |
Seems to be a regression. The updated tests succeeds on v1.15.3, so some something must've changed between then and v1.16.1 for it to stop working. |
CharlieTLe
added a commit
to CharlieTLe/cortex
that referenced
this issue
May 10, 2024
We are creating a job which has the tenant name for each tenant to query, but we use the incorrect index in the `ids` slice that contains the list of tenants. This causes the querier to select results for the first tenant in the list of tenants to match with instead of the actual tenant the querier was intended for. I updated the existing tests to check the labels of the results as well instead of only relying on the number of series found. Fixes cortexproject#5941 Signed-off-by: Charlie Le <[email protected]>
3 tasks
yeya24
pushed a commit
that referenced
this issue
May 20, 2024
We are creating a job which has the tenant name for each tenant to query, but we use the incorrect index in the `ids` slice that contains the list of tenants. This causes the querier to select results for the first tenant in the list of tenants to match with instead of the actual tenant the querier was intended for. I updated the existing tests to check the labels of the results as well instead of only relying on the number of series found. Fixes #5941 Signed-off-by: Charlie Le <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Query federation returns series for the incorrect tenant when using the
__tenant_id__
label matcher.To Reproduce
Steps to reproduce the behavior:
tenant-a
andtenant-b
metric_name{foo="bar"} 1
metric_name{foo="baz"} 2
X-Scope-OrgID: tenant-a|tenant-b
formetric_name{__tenant_id__="tenant-b"}
metric_name{__tenant_id__="tenant-b", foo="bar"} 1
Expected behavior
Expected
metric_name{__tenant_id__="tenant-b", foo="baz"} 2
Environment:
Additional Context
I was able to reproduce this by updating the existing tests to also check the labels from the series that were queried instead of only checking the number of series returned:
When the test runs, the following failure output occurs:
The text was updated successfully, but these errors were encountered: