query-frontend: Allow separate label cache #3560
Merged
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.
Instead of using the cache config from the query-range.
Changes
Fixed a bug in which the cache config from the query frontend's query range cache was passed to the label cache. This made it impossible to use a label cache on its own, because invalid empty yaml (from the query range cache) would be passed to the label cache config builder.
Any users who are attempting to use separate label and query range caches today should find that the query range one is being used for both. If this is merged and upgraded to, it will cause the label cache to become used instead.
Verification
I've only done some very basic testing, by running the thanos binary locally and verifying whether the different config combinations cause an error on startup with or without this fix.
The error I see from master is: