{"record":{"id":"35451df26b346b23","repo":"apache/seatunnel","slug":"dry-run-is-only-supported-via-cli","errorCode":null,"errorMessage":"Dry-run is only supported via CLI","messagePattern":"Dry-run is only supported via CLI","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java","lineNumber":390,"sourceCode":"        JsonArray jsonResponse = new JsonArray();\n        List<Map> jobList = JsonUtils.toList(requestHandle(requestBody).toString(), Map.class);\n\n        jobList.forEach(\n                job -> {\n                    handleStopJob(job, getSeaTunnelServer(false), nodeEngine.getNode());\n                    jsonResponse.add(\n                            new JsonObject()\n                                    .add(RestConstant.JOB_ID, (Long) job.get(RestConstant.JOB_ID)));\n                });\n\n        return jsonResponse;\n    }\n\n    public JsonObject submitJob(Map<String, String> requestParams, byte[] requestBody) {\n\n        if (requestParams.containsKey(RestConstant.DRY_RUN)\n                && requestParams.get(RestConstant.DRY_RUN) != null) {\n            throw new IllegalArgumentException(\"Dry-run is only supported via CLI\");\n        }\n        if (Boolean.parseBoolean(requestParams.get(RestConstant.IS_START_WITH_SAVE_POINT))\n                && requestParams.get(RestConstant.JOB_ID) == null) {\n            throw new IllegalArgumentException(\"Please provide jobId when start with save point.\");\n        }\n        validateCheckpointRestoreRequest(requestParams);\n        Config config;\n        ConfigFormat configFormat = ConfigFormat.fromString(requestParams.get(CONFIG_FORMAT));\n\n        switch (configFormat) {\n            case HOCON:\n                config = ConfigFactory.parseString(new String(requestBody, StandardCharsets.UTF_8));\n                break;\n            case SQL:\n                config = SqlConfigBuilder.of(new String(requestBody, StandardCharsets.UTF_8));\n                break;\n            case JSON:\n            default:","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java#L372-L408","documentation":"The REST submitJob endpoint explicitly rejects the dryRun parameter because dry-run execution is only implemented in the CLI (client-side local run). Passing ?dryRun=... to the REST API throws IllegalArgumentException before any validation of the rest of the request.","triggerScenarios":"Calling POST /submit-job?dryRun=true (or any non-null dryRun value) on the Zeta REST API.","commonSituations":"Reusing CLI flags in REST calls; automated tools adding dryRun universally; docs/code examples mixing CLI and REST submission.","solutions":["Remove the dryRun parameter from the REST request","Use the CLI for dry runs: sh bin/seatunnel.sh --config <config> -m local -e run --dry-run","Implement validation-only checks client-side (config parsing) instead of relying on REST dry-run"],"exampleFix":"// before\nPOST /submit-job?dryRun=true\n// after\nPOST /submit-job   // or use CLI: seatunnel.sh --dry-run","handlingStrategy":"validation","validationCode":"if ('dryRun' in params || 'DRY_RUN' in params) throw new Error('use CLI for dry-run, not REST');","typeGuard":null,"tryCatchPattern":"try {\n    await post('/submit-job?...', body);\n} catch (e) {\n    if (String(e).includes('Dry-run is only supported via CLI')) {\n        // strip dryRun param or switch to CLI\n    }\n}","preventionTips":["Never forward CLI flags to REST query params","Use seatunnel.sh --dry-run for validation runs","Keep REST submission params limited to documented keys"],"tags":["rest-api","cli","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}