thanos-io/thanos · error
invalid ResultsCache config for query_range tripperware
Error message
invalid ResultsCache config for query_range tripperware
What it means
After the split check, Validate runs the Cortex ResultsCacheConfig.Validate against a stub querier.Config and wraps any failure with 'invalid ResultsCache config for query_range tripperware'. It indicates the underlying Cortex results-cache options for query_range are inconsistent (e.g. bad cache backend settings).
Solutions
- Read the wrapped inner error for the precise Cortex validation failure and fix that option.
- Regenerate the response-cache config file from a Thanos example matching your Thanos version.
- Upgrade/align Thanos and Cortex versions if the config schema changed.
- Temporarily disable the query_range results cache to confirm the rest of the config is fine.
Defensive patterns
Strategy: validation
Validate before calling
// sanity-check the cache backend settings inside the results cache file before start
if cachingEnabled {
if err := validateCacheBackend(cacheCfg); err != nil {
return fmt.Errorf("results cache backend invalid: %w", err)
}
} Try / catch
if err := cfg.Validate(); err != nil {
if strings.Contains(err.Error(), "invalid ResultsCache config for query_range tripperware") {
return fmt.Errorf("fix inner Cortex results-cache option: %w", err)
}
return err
} Prevention
- Keep the results-cache config generated from version-matched examples.
- Log full wrapped errors to expose the Cortex-level cause.
- Pin Thanos version to keep the embedded Cortex schema stable.
When it happens
Trigger: cfg.QueryRangeConfig.ResultsCacheConfig.Validate(ignoredQueryConfig) returns an error — Cortex-level validation of the results cache config fails.
Common situations: Malformed cache backend options carried into the Cortex config, missing cache name/backend in the generated results-cache config, or version mismatch where Cortex added new required fields.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- split queries or split threshold interval should be greater…
- split queries interval should be greater than 0 when…
- split queries interval and dynamic query split interval…
- invalid ResultsCache config for labels tripperware
- labels.default-time-range cannot be set to 0
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/cb43486cf61380d0.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/queryfrontend/config.go:272
SplitQueriesByInterval time.Duration
MaxRetries int
Limits *cortexvalidation.Limits
}
// Validate a fully initialized config.
func (cfg *Config) Validate() error {
if cfg.QueryRangeConfig.ResultsCacheConfig != nil {
if cfg.QueryRangeConfig.SplitQueriesByInterval <= 0 && !cfg.isDynamicSplitSet() {
return errors.New("split queries or split threshold interval should be greater than 0 when caching is enabled")
}
// This is instantiated just to make the QFE config comply with validation against the Cortex Querier,
// but in Thanos we don't use this configuration at all.
ignoredQueryConfig := querier.Config{
EnablePerStepStats: cfg.QueryRangeConfig.ResultsCacheConfig.CacheQueryableSamplesStats,
}
if err := cfg.QueryRangeConfig.ResultsCacheConfig.Validate(ignoredQueryConfig); err != nil {
return errors.Wrap(err, "invalid ResultsCache config for query_range tripperware")
}
}
if cfg.isDynamicSplitSet() && cfg.isStaticSplitSet() {
return errors.New("split queries interval and dynamic query split interval cannot be set at the same time")
}
if cfg.isDynamicSplitSet() {
if err := cfg.validateDynamicSplitParams(); err != nil {
return err
}
}
if cfg.LabelsConfig.ResultsCacheConfig != nil {
if cfg.LabelsConfig.SplitQueriesByInterval <= 0 {
return errors.New("split queries interval should be greater than 0 when caching is enabled")
}View on GitHub (pinned to 35b8b99117)