{"record":{"id":"815672cd496beee2","repo":"apache/seatunnel","slug":"unsupported-dry-run-mode-value-currently-onl","errorCode":null,"errorMessage":"Unsupported dry-run mode '${value}'. Currently only [static, connect, sample] are supported; shadow is not implemented yet.","messagePattern":"Unsupported dry-run mode '(.+?)'\\. Currently only \\[static, connect, sample\\] are supported; shadow is not implemented yet\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/args/ClientCommandArgs.java","lineNumber":244,"sourceCode":"        @Override\n        public DryRun convert(String value) {\n            if (value == null || value.trim().isEmpty()) {\n                throw new IllegalArgumentException(\"Dry-run mode must not be empty.\");\n            }\n            String trimmed = value.trim();\n            if (DryRun.STATIC.getName().equalsIgnoreCase(trimmed)\n                    || DryRun.STATIC.name().equalsIgnoreCase(trimmed)) {\n                return DryRun.STATIC;\n            }\n            if (DryRun.CONNECT.getName().equalsIgnoreCase(trimmed)\n                    || DryRun.CONNECT.name().equalsIgnoreCase(trimmed)) {\n                return DryRun.CONNECT;\n            }\n            if (DryRun.SAMPLE.getName().equalsIgnoreCase(trimmed)\n                    || DryRun.SAMPLE.name().equalsIgnoreCase(trimmed)) {\n                return DryRun.SAMPLE;\n            }\n            throw new IllegalArgumentException(\n                    \"Unsupported dry-run mode '\"\n                            + value\n                            + \"'. Currently only [static, connect, sample] are supported; shadow\"\n                            + \" is not implemented yet.\");\n        }\n    }\n\n    /** Returns the configured sample limit, or the default limit when it was not specified. */\n    public int getSampleLimit() {\n        return sampleLimit == null ? DryRunSampleConfig.DEFAULT_LIMIT : sampleLimit;\n    }\n\n    /** Validates options that depend on other command-line arguments. */\n    public void validateCommandOptions() {\n        validateSampleOptions();\n        if (dryRun == DryRun.SAMPLE) {\n            validateSampleMode();\n        }","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/args/ClientCommandArgs.java#L226-L262","documentation":"This IllegalArgumentException is thrown by ClientCommandArgs' dry-run converter (a picocli IStringConverter) when the --dry-run value supplied on the CLI cannot be mapped to a DryRun enum constant. The converter accepts only static, connect, and sample (case-insensitive); 'shadow' is named explicitly as a known-but-unimplemented mode. SeaTunnel throws it during argument parsing, before any job is submitted.","triggerScenarios":"Running `seatunnel.sh --dry-run shadow ...` or any misspelled/unsupported value like `--dry-run Statics` that doesn't equal (ignoring case) static/connect/sample or their enum names.","commonSituations":"Typo in the dry-run flag value; copying docs or an older example that mentions the planned 'shadow' mode; assuming case must be exact and passing e.g. 'STATIC' (actually accepted) vs 'static-mode' (rejected).","solutions":["Change --dry-run to one of: static, connect, or sample","If you intended shadow mode, it is not implemented; use static mode instead","Check spelling/case-insensitive match against the three supported names"],"exampleFix":"// before\n--dry-run shadow\n// after\n--dry-run static","handlingStrategy":"validation","validationCode":"const ALLOWED = ['static','connect','sample'];\nif (!ALLOWED.includes(dryRun.toLowerCase())) {\n  throw new Error(`--dry-run must be one of ${ALLOWED}; got: ${dryRun}`);\n}","typeGuard":"const isDryRun = (v) => typeof v === 'string' && ['static','connect','sample'].includes(v.toLowerCase());","tryCatchPattern":null,"preventionTips":["Only use documented dry-run values: static, connect, sample","Do not use 'shadow' - it is not implemented yet","Keep CLI wrappers in sync with the DryRun enum"],"tags":["cli","dry-run","argument-parsing"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}