thanos
thanos copied to clipboard
Remove hardcoded labels in store shard matcher and inject unshardable label in query analyzer
Signed-off-by: haanhvu [email protected]
fixes #5625
- [ ] I added CHANGELOG entry for this change.
- [ ] Change is not relevant to the end user.
Changes
Remove hardcoded __name__ label in store shard matcher to make it shardable. Inject unshardable le label in query analyzer.
Verification
Convert to draft to fix errors and warnings
Thanks for the contribution. We should also add tests for this change.
@fpetkovski actually I didn't add the test because I see we already have one test case with le label?
https://github.com/thanos-io/thanos/blob/544d67a8f3f0c8187afa974cad71972aeb10d297/pkg/querysharding/analyzer_test.go#L125-L126
@fpetkovski I fixed all the suggestions. Pls review.
Thanks for the contribution. We should also add tests for this change.
@fpetkovski actually I didn't add the test because I see we already have one test case with
lelabel?https://github.com/thanos-io/thanos/blob/544d67a8f3f0c8187afa974cad71972aeb10d297/pkg/querysharding/analyzer_test.go#L125-L126
We already have a shardableByLabels test case. So I just add a shardableWithoutLabels test case.
Also, could you review https://github.com/thanos-io/thanos/pull/5653 too?
Thanks, I can take a look at this tomorrow.
@fpetkovski done converting to local variables