{"record":{"id":"5c8e5d932d359324","repo":"grafana/k6","slug":"retrybackoff-must-be-greater-than-0","errorCode":null,"errorMessage":"retryBackoff must be greater than 0","messagePattern":"retryBackoff must be greater than 0","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/secretsource/url/url.go","lineNumber":599,"sourceCode":"\n\tif config.Timeout.Duration <= 0 {\n\t\treturn errors.New(\"timeout must be greater than 0\")\n\t}\n\n\tif config.RequestsPerMinuteLimit.Int64 <= 0 {\n\t\treturn errors.New(\"requestsPerMinuteLimit must be greater than 0\")\n\t}\n\n\tif config.RequestsBurst.Int64 <= 0 {\n\t\treturn errors.New(\"requestsBurst must be greater than 0\")\n\t}\n\n\tif config.MaxRetries.Int64 < 0 {\n\t\treturn errors.New(\"maxRetries must be non-negative\")\n\t}\n\n\tif config.RetryBackoff.Duration <= 0 {\n\t\treturn errors.New(\"retryBackoff must be greater than 0\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":581,"sourceCodeEnd":604,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/secretsource/url/url.go#L581-L604","documentation":"validateConfig() requires a strictly positive retryBackoff duration for the url secret source; it is the base delay between retry attempts and a zero/negative backoff would make retries spin immediately. It only triggers when an explicit override makes the value non-positive, since the default is positive.","triggerScenarios":"Setting K6_SECRET_SOURCE_URL_RETRY_BACKOFF='0s' (or a negative duration), or \"retryBackoff\": \"0s\" in the JSON/inline config.","commonSituations":"Zeroing the backoff to make retries 'instant'; config scaffolds that set every duration to 0s; unit fixtures reusing a zeroed struct.","solutions":["Remove the K6_SECRET_SOURCE_URL_RETRY_BACKOFF override to use the default","Or set a small positive duration such as '100ms' or '1s'","Audit config files for zeroed duration fields before deploying"],"exampleFix":"# before\nK6_SECRET_SOURCE_URL_RETRY_BACKOFF='0s'\n\n# after\nK6_SECRET_SOURCE_URL_RETRY_BACKOFF='500ms'","handlingStrategy":"validation","validationCode":"const backoff = process.env.K6_SECRET_SOURCE_URL_RETRY_BACKOFF;\nif (backoff && /^(0|[-\\d.]+)/.test(backoff)) {\n  throw new Error('retryBackoff must be > 0');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Omit retryBackoff to use the default instead of zeroing it","Prefer small positive values like 100ms-1s","Audit config files for 0s durations before deploy"],"tags":["config","secrets","retries","validation","startup"],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}