{"record":{"id":"cf9561b2de4052b8","repo":"thanos-io/thanos","slug":"setup-tripperwares","errorCode":null,"errorMessage":"setup tripperwares","messagePattern":"setup tripperwares","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/query_frontend.go","lineNumber":321,"sourceCode":"\t\treturn errors.Wrap(err, \"error validating the config\")\n\t}\n\n\tif cfg.EnableXFunctions {\n\t\tmaps.Copy(parser.Functions, parse.XFunctions)\n\t}\n\n\tif len(cfg.EnableFeatures) > 0 {\n\t\tfor _, feature := range cfg.EnableFeatures {\n\t\t\tif feature == promqlExperimentalFunctions {\n\t\t\t\tparser.EnableExperimentalFunctions = true\n\t\t\t\tlevel.Info(logger).Log(\"msg\", \"Experimental PromQL functions enabled.\", \"option\", promqlExperimentalFunctions)\n\t\t\t}\n\t\t}\n\t}\n\n\ttripperWare, err := queryfrontend.NewTripperware(cfg.Config, reg, logger)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"setup tripperwares\")\n\t}\n\n\t// Create a downstream roundtripper.\n\tdownstreamTripperConfContentYaml, err := cfg.DownstreamTripperConfig.CachePathOrContent.Content()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdownstreamTripper, err := parseTransportConfiguration(downstreamTripperConfContentYaml)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdownstreamRT, err := cortexfrontend.NewDownstreamRoundTripper(cfg.DownstreamURL, downstreamTripper)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"setup downstream roundtripper\")\n\t}\n\n\t// Wrap the downstream RoundTripper into query frontend Tripperware.","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/query_frontend.go#L303-L339","documentation":"This wraps errors from queryfrontend.NewTripperware, which constructs the tripperware chain (query-range/labels middleware, results cache, limits). Failure means the validated config could not be instantiated into middleware — typically an internal configuration-dependent construction error such as invalid codec or limits setup.","triggerScenarios":"NewTripperware returning an error for a config that passed Validate but cannot build its components (e.g. problematic per-tenant limits, response cache setup edge cases).","commonSituations":"Bugs or version mismatches between the config schema and the tripperware builder, unusual combinations of feature flags, or custom builds with incompatible Cortex queryfrontend versions.","solutions":["Read the wrapped underlying error from NewTripperware for the failing component.","Bisect feature flags to isolate the problematic tripperware option.","Check for known issues in your Thanos version; upgrade to a patched release.","Verify config matches the schema documented for your exact version."],"exampleFix":"// before\nquery-frontend --query-range-response-cache-compression=zstd --enable-feature=unsupported-flag\n// after\nquery-frontend --query-range-response-cache-compression=zstd","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"tw, err := queryfrontend.NewTripperware(cfg.Config, reg, logger)\nif err != nil {\n  return fmt.Errorf(\"setup tripperwares: %w\", err)\n}","preventionTips":["Keep Thanos and config schema versions aligned","Bisect feature flags when startup fails here","Check upstream issue tracker for known bugs"],"tags":["tripperware","config","startup"],"backgroundTag":"module-init-failed","analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}