{"record":{"id":"cd0f053992171e80","repo":"grafana/k6","slug":"invalid-config-format-q-expected-key-value","errorCode":null,"errorMessage":"invalid config format %q, expected key=value","messagePattern":"invalid config format %q, expected key=value","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/secretsource/url/url.go","lineNumber":335,"sourceCode":"\n\tlogger.WithFields(logrus.Fields{\n\t\t\"attempts\": attempts,\n\t\t\"error\":    lastErr,\n\t}).Debug(\"Max retry attempts reached\")\n\n\treturn lastErr\n}\n\nfunc parseInlineConfig(configArg string, fs fsext.Fs) (extConfig, error) {\n\tvar fileCfg extConfig\n\tvar inlineCfg extConfig\n\n\t// Split by comma to parse key=value pairs\n\tparts := strings.SplitSeq(configArg, \",\")\n\tfor part := range parts {\n\t\tkey, value, ok := strings.Cut(part, \"=\")\n\t\tif !ok {\n\t\t\treturn extConfig{}, fmt.Errorf(\"invalid config format %q, expected key=value\", part)\n\t\t}\n\n\t\tif key == \"config\" {\n\t\t\t// Load from file\n\t\t\tvar err error\n\t\t\tfileCfg, err = loadConfigFromFile(value, fs)\n\t\t\tif err != nil {\n\t\t\t\treturn extConfig{}, err\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tif err := parseInlineConfigOption(key, value, &inlineCfg); err != nil {\n\t\t\treturn extConfig{}, err\n\t\t}\n\t}\n\n\t// Apply configs in order: file -> inline","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/secretsource/url/url.go#L317-L353","documentation":"parseInlineConfig expects every comma-separated fragment of the url secret source config to be key=value. A fragment without '=' (or an empty fragment) triggers this validation error; at fault is the raw config string supplied by the user to the url secret source.","triggerScenarios":"Thrown at internal/secretsource/url/url.go:335 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write every option as key=value, e.g. urlTemplate=https://svc/{key},maxRetries=3","Remove stray comma-separated tokens"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}