{"record":{"id":"c9a7ad8e62e698fd","repo":"grafana/k6","slug":"failed-to-create-retry-interceptors-w","errorCode":null,"errorMessage":"failed to create retry interceptors: %w","messagePattern":"failed to create retry interceptors: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cloudapi/insights/client.go","lineNumber":242,"sourceCode":"\t} else {\n\t\tif cfg.TLSConfig.CertFile != \"\" {\n\t\t\tcreds, err := credentials.NewClientTLSFromFile(cfg.TLSConfig.CertFile, \"\")\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to load TLS credentials from file: %w\", err)\n\t\t\t}\n\t\t\topts = append(opts, grpc.WithTransportCredentials(creds))\n\t\t} else {\n\t\t\topts = append(opts, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS13})))\n\t\t}\n\t}\n\n\tif cfg.AuthConfig.Enabled {\n\t\topts = append(opts, grpc.WithPerRPCCredentials(newPerRPCCredentials(cfg.AuthConfig)))\n\t}\n\n\trI, err := retryInterceptor(cfg.RetryConfig)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create retry interceptors: %w\", err)\n\t}\n\n\topts = append(opts, grpc.WithChainUnaryInterceptor([]grpc.UnaryClientInterceptor{rI}...))\n\n\treturn opts, nil\n}\n\nfunc retryInterceptor(retryConfig ClientRetryConfig) (grpc.UnaryClientInterceptor, error) {\n\trSC, err := retryableStatusCodes(retryConfig.RetryableStatusCodes)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse retryable status codes: %w\", err)\n\t}\n\twithCodes := grpcRetry.WithCodes(rSC...)\n\twithMax := grpcRetry.WithMax(retryConfig.MaxAttempts)\n\twithPerRetryTimeout := grpcRetry.WithPerRetryTimeout(retryConfig.PerRetryTimeout)\n\tcallOptions := []grpcRetry.CallOption{withCodes, withMax, withPerRetryTimeout}\n\n\tbackoffConfig := retryConfig.BackoffConfig","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/cloudapi/insights/client.go#L224-L260","documentation":"Dial option construction ends by building a retry interceptor from RetryConfig (internal/cloudapi/insights/client.go:240-243); any failure there is wrapped as 'failed to create retry interceptors'. The current only failure source is parsing RetryableStatusCodes (see the sibling 'failed to parse retryable status codes' error), so this message is effectively an outer wrapper telling you the insights retry configuration is invalid.","triggerScenarios":"RetryConfig.RetryableStatusCodes empty (produces 'no retryable status codes provided') or containing a name that is not a valid gRPC code (produces 'invalid status code X provided'); config injected by an orchestrator or env override with a malformed list.","commonSituations":"Orchestrator-managed runs exporting a retry-codes env var with lowercase names, trailing spaces, or semicolons instead of commas; an override written for an older config schema.","solutions":["Read the wrapped message - it states whether the list is empty or which entry is invalid","Set a valid comma-separated list of gRPC code names, e.g. 'Unavailable,ResourceExhausted' (case matters)","Remove the override entirely so the client uses its defaults","Update k6 / the orchestrator so the emitted config matches the current schema"],"exampleFix":"# before\nexport K6_CLOUD_API_RETRY_RETRYABLE_STATUS_CODES='unavailable; resource_exhausted'\n\n# after\nexport K6_CLOUD_API_RETRY_RETRYABLE_STATUS_CODES='Unavailable,ResourceExhausted'","handlingStrategy":"validation","validationCode":"# reject invalid retry-code lists before launch\nIFS=',' read -ra CODES <<< \"$K6_CLOUD_API_RETRY_RETRYABLE_STATUS_CODES\"\nVALID='OK Canceled Unknown InvalidArgument DeadlineExceeded NotFound AlreadyExists PermissionDenied ResourceExhausted FailedPrecondition Aborted OutOfRange Unimplemented Internal Unavailable DataLoss Unauthenticated'\nfor c in \"${CODES[@]}\"; do\n  [[ \" $VALID \" == *\" $c \"* ]] || { echo \"invalid gRPC code: $c\"; exit 1; }\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use exact CamelCase gRPC code names separated by single commas with no spaces","Prefer omitting the retry-codes override over setting an empty value - empty is an error, not 'no retries'","Centralize insights retry config in one template instead of per-pipeline copies"],"tags":["grpc","insights","retry","configuration","cloud"],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}