{"record":{"id":"114fcab1ac009215","repo":"apache/seatunnel","slug":"seatunnel-job-on-flink-engine-deploy-mode-only-sup","errorCode":null,"errorMessage":"SeaTunnel job on flink engine deploy mode only support these options: [run, run-application]","messagePattern":"SeaTunnel job on flink engine deploy mode only support these options: \\[run, run-application\\]","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/args/FlinkCommandArgs.java","lineNumber":132,"sourceCode":"            }\n        }\n    }\n\n    public static class FlinkDeployModeConverter implements IStringConverter<DeployMode> {\n        private static final List<DeployMode> DEPLOY_MODE_TYPE_LIST = new ArrayList<>();\n\n        static {\n            DEPLOY_MODE_TYPE_LIST.add(DeployMode.RUN);\n            DEPLOY_MODE_TYPE_LIST.add(DeployMode.RUN_APPLICATION);\n        }\n\n        @Override\n        public DeployMode convert(String value) {\n            DeployMode deployMode = DeployMode.valueOf(value.toUpperCase().replaceAll(\"-\", \"_\"));\n            if (DEPLOY_MODE_TYPE_LIST.contains(deployMode)) {\n                return deployMode;\n            } else {\n                throw new IllegalArgumentException(\n                        \"SeaTunnel job on flink engine deploy mode only \"\n                                + \"support these options: [run, run-application]\");\n            }\n        }\n    }\n}\n","sourceCodeStart":114,"sourceCodeEnd":139,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/args/FlinkCommandArgs.java#L114-L139","documentation":"IllegalArgumentException thrown by FlinkCommandArgs' DeployModeConverter.convert when the -d/--deploy-mode CLI argument is not one of the supported Flink deploy modes (run, run-application). The value must map to the DeployMode enum and be present in DEPLOY_MODE_TYPE_LIST.","triggerScenarios":"Running the Flink starter client with e.g. `--deploy-mode cluster` or `--deploy-mode client` — valid for Spark but not for this Flink converter — causing the membership check to fail after enum parsing.","commonSituations":"Reusing Spark client flags on the Flink client; typos like 'runapplication'; outdated scripts referencing removed modes.","solutions":["Use --deploy-mode run or --deploy-mode run-application","Check `--help` output for accepted deploy modes","Remove the flag entirely if the default mode is acceptable"],"exampleFix":"# before\n--deploy-mode cluster\n# after\n--deploy-mode run","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"run\", \"run-application\");\nif (!allowed.contains(deployModeArg)) {\n    throw new IllegalArgumentException(\"Unsupported --deploy-mode: \" + deployModeArg);\n}","typeGuard":null,"tryCatchPattern":"try {\n    args = FlinkCommandArgsBuilder.build(rawArgs);\n} catch (IllegalArgumentException e) {\n    System.err.println(\"Invalid --deploy-mode: \" + e.getMessage());\n}","preventionTips":["Use only run / run-application for Flink deployments","Do not reuse Spark deploy-mode flags in Flink client scripts","Validate CLI args in wrapper scripts before invoking the client"],"tags":["cli","flink","arguments"],"backgroundTag":"invalid-cli-argument","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}