{"record":{"id":"88337b20ea89432d","repo":"docker/compose","slug":"s-must-be-an-integer-found-q","errorCode":null,"errorMessage":"%s must be an integer (found: %q)","messagePattern":"(.+?) must be an integer \\(found: %q\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/compose/compose.go","lineNumber":549,"sourceCode":"\t\t\t\t\t}\n\t\t\t\t\topts.EnvFiles[i] = file\n\t\t\t\t} else {\n\t\t\t\t\topts.EnvFiles[i] = file\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcomposeCmd := cmd\n\t\t\tfor composeCmd.Name() != PluginName {\n\t\t\t\tif !composeCmd.HasParent() {\n\t\t\t\t\treturn fmt.Errorf(\"error parsing command line, expected %q\", PluginName)\n\t\t\t\t}\n\t\t\t\tcomposeCmd = composeCmd.Parent()\n\t\t\t}\n\n\t\t\tif v, ok := os.LookupEnv(ComposeParallelLimit); ok && !composeCmd.Flags().Changed(\"parallel\") {\n\t\t\t\ti, err := strconv.Atoi(v)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"%s must be an integer (found: %q)\", ComposeParallelLimit, v)\n\t\t\t\t}\n\t\t\t\tparallel = i\n\t\t\t}\n\t\t\tif parallel > 0 {\n\t\t\t\tlogrus.Debugf(\"Limiting max concurrency to %d jobs\", parallel)\n\t\t\t\tbackendOptions.Add(compose.WithMaxConcurrency(parallel))\n\t\t\t}\n\n\t\t\t// dry run detection\n\t\t\tif dryRun {\n\t\t\t\tbackendOptions.Add(compose.WithDryRun)\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t}\n\n\tc.AddCommand(\n\t\tupCommand(&opts, dockerCli, backendOptions),","sourceCodeStart":531,"sourceCodeEnd":567,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/cmd/compose/compose.go#L531-L567","documentation":"The COMPOSE_PARALLEL_LIMIT environment variable caps concurrency for compose operations. During startup, if the flag --parallel was not set, compose parses the env var with strconv.Atoi; a non-numeric value (including empty or trailing whitespace/garbage) aborts command initialization before anything runs.","triggerScenarios":"COMPOSE_PARALLEL_LIMIT=4x, =high, =' 4', or exported as empty-but-set, while running any compose command that triggers the root PersistentPreRunE, without an explicit --parallel flag.","commonSituations":"Typos in CI env configuration; values copied from docs with units ('4 workers'); export COMPOSE_PARALLEL_LIMIT without a value in shell profiles; secrets managers injecting the variable as an empty string.","solutions":["Set a plain integer: `export COMPOSE_PARALLEL_LIMIT=4`","Unset it if the default concurrency is fine: `unset COMPOSE_PARALLEL_LIMIT`","Or bypass the env entirely with `--parallel N` on the command line (a changed flag skips the env parse)"],"exampleFix":"# before\nexport COMPOSE_PARALLEL_LIMIT=\"4 workers\"\n# after\nexport COMPOSE_PARALLEL_LIMIT=4","handlingStrategy":"validation","validationCode":"if [ -n \"${COMPOSE_PARALLEL_LIMIT:-}\" ]; then\n  case \"$COMPOSE_PARALLEL_LIMIT\" in\n    ''|*[!0-9]*) echo \"COMPOSE_PARALLEL_LIMIT must be an integer\" >&2; exit 2;;\n  esac\nfi\ndocker compose up","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set numeric-only env values in CI matrices; validate with a shell numeric guard","Prefer the --parallel flag for per-invocation control instead of a global env var"],"tags":["environment","cli","configuration","validation"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}