{"record":{"id":"a04eafde20bb0237","repo":"apache/seatunnel","slug":"sample-dry-run-mode-requires-master-deploy-mod","errorCode":null,"errorMessage":"Sample dry-run mode requires --master/--deploy-mode local.","messagePattern":"Sample dry-run mode requires --master/--deploy-mode local\\.","errorType":"validation","errorClass":"ParameterException","httpStatus":null,"severity":"error","filePath":"seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/args/ClientCommandArgs.java","lineNumber":273,"sourceCode":"    }\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        }\n    }\n\n    /**\n     * Validates that sample mode runs locally without asynchronous submission, restore, savepoint,\n     * validation, job control, encryption, or decryption options.\n     *\n     * @throws ParameterException when sample mode is combined with an unsupported option\n     */\n    public void validateSampleMode() {\n        if (masterType != MasterType.LOCAL) {\n            throw new ParameterException(\n                    \"Sample dry-run mode requires --master/--deploy-mode local.\");\n        }\n        if (async) {\n            throw new ParameterException(\"Sample dry-run mode does not support --async.\");\n        }\n        if (restoreJobId != null\n                || restoreWithCheckpointJobId != null\n                || savePointJobId != null\n                || checkConfig\n                || listJob\n                || getRunningJobMetrics\n                || jobId != null\n                || cancelJobId != null\n                || forceCancelJobId != null\n                || metricsJobId != null\n                || checkpointOverviewJobId != null\n                || checkpointHistoryJobId != null\n                || encrypt","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/args/ClientCommandArgs.java#L255-L291","documentation":"ClientCommandArgs.validateSampleMode() throws this picocli ParameterException when --dry-run sample is used with a master/deploy-mode other than local. Sample dry-run executes the pipeline in-process on a local engine, so a cluster master target is meaningless and rejected up front.","triggerScenarios":"Running with `--dry-run sample` while --master is set to cluster (or any MasterType != LOCAL), e.g. `--dry-run sample --master cluster`.","commonSituations":"Copying a cluster-submission command line and adding --dry-run sample; CI scripts that default to --master cluster; forgetting that sample mode implies local execution.","solutions":["Drop --master/--deploy-mode or set it to local: --master local","If cluster execution is required, remove --dry-run sample and run the job normally"],"exampleFix":"// before\n--dry-run sample --master cluster\n// after\n--dry-run sample --master local","handlingStrategy":"validation","validationCode":"if (dryRun === 'sample' && masterType !== 'local') {\n  throw new Error('--dry-run sample requires --master local');\n}","typeGuard":null,"tryCatchPattern":"try {\n  seatunnel.run(args);\n} catch (ParameterException e) {\n  if (e.getMessage().contains('requires --master/--deploy-mode local')) {\n    args.add('--master').add('local');\n  } else { throw e; }\n}","preventionTips":["Never combine --dry-run sample with --master cluster","Dedicated sample-mode commands should not inherit cluster submission flags","Verify masterType == local before adding sample options"],"tags":["cli","dry-run","config-conflict"],"backgroundTag":"conflicting-config-options","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"}