You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][Core] CLI enum arguments fail to parse under a Turkish or Azerbaijani locale #13080
I had searched in the issues and found no similar issues.
What happened
The CLI converts enum-valued arguments with String#toUpperCase() / String#toLowerCase() without a locale before matching them against the enum constants, so the result depends on the JVM default locale. Under a Turkish or Azerbaijani locale, client upper-cases to CLİENT (dotted capital I) and sink to SİNK, which are not enum names.
Affected conversions:
Module
Argument
Under tr-TR
seatunnel-spark-starter-common
--deploy-mode client
IllegalArgumentException: No enum constant ...DeployMode.CLİENT
seatunnel-flink-starter-common
--deploy-mode run-application
IllegalArgumentException: No enum constant ...DeployMode.RUN_APPLİCATİON
seatunnel-flink-starter-common
--target yarn-session / kubernetes-application
IllegalArgumentException: No enum constant ...MasterType.YARN_SESSİON
seatunnel-starter
seatunnel-connector.sh -pt sink
reports "only support these options: [source, sink, transform]" although sink was passed
seatunnel-starter
--metadata-export -pt sink
reports "Plugin type must be one of: [source, sink, transform]"
DeployMode.from(String) has the same default-locale conversion and additionally throws a NullPointerException for a null argument.
What you expected to happen
CLI enum arguments are parsed identically under any JVM default locale.
SeaTunnel Version
dev, verified at commit fcb404cd947da03a712c4ae9ee9068744bd946a5.
SeaTunnel Config
Not configuration dependent; the failure happens while the command line arguments are parsed.
Running Command
JAVA_TOOL_OPTIONS="-Duser.language=tr -Duser.country=TR" ./bin/seatunnel.sh -m local -c config/v2.batch.config.template
# or, with the Spark starter:
JAVA_TOOL_OPTIONS="-Duser.language=tr -Duser.country=TR" ./bin/start-seatunnel-spark-3-connector-v2.sh --deploy-mode client
Error Exception
java.lang.IllegalArgumentException: No enum constant org.apache.seatunnel.common.config.DeployMode.CLİENT
Zeta or Flink or Spark Version
Not engine specific: the conversion happens in the starters that are shared by all engines.
Thanks for the detailed report and the reproduction steps. Since you're willing to submit a PR, please go ahead. It would be good for the fix to cover all the conversions listed in your table (the Spark and Flink --deploy-mode / --target handling in seatunnel-spark-starter-common and seatunnel-flink-starter-common, and the -pt handling in seatunnel-starter) so the case conversion no longer depends on the JVM default locale, and to also handle the null argument case in DeployMode.from(String) that you mentioned. A unit test that runs these conversions under a Turkish default locale would help prevent a regression.
Thanks @SEZ9. I opened #13081, which covers every conversion listed in the report: the Spark and Flink --deploy-mode / --target handling in seatunnel-spark-starter-common and seatunnel-flink-starter-common, the -pt handling in seatunnel-starter (connector check and metadata export), and the null argument of DeployMode.from(String). The PR adds tests that run these conversions under a Turkish default locale, and I confirmed the new tests fail against the unpatched sources.
-pt / --plugin-type in seatunnel-starter — both ConnectorCheckCommandArgs and MetadataExportCommandArgs use Locale.ROOT
DeployMode.from(String) — now returns Optional.empty() for a null argument instead of throwing, and lower-cases with Locale.ROOT
The dash-to-underscore mapping is kept, so run-application and yarn-session still resolve to RUN_APPLICATION and YARN_SESSION under any locale.
Turkish locale tests — DeployModeTest, SparkCommandArgsConverterTest, FlinkCommandArgsConverterTest and ConnectorCheckCommandArgsTest each parse the arguments with new Locale("tr", "TR") as the default locale and restore the previous default afterwards. DeployModeTest also asserts from(null) returns empty.
One note: the workflows on #13081 are still waiting for a maintainer to approve them (action_required), so no test has run in CI yet. Everything above was verified locally on JDK 17.
Thanks @sharpca for the detailed breakdown. From your description, the PR addresses each item in the report — the Spark/Flink --deploy-mode and --target conversions, -pt / --plugin-type handling, and the null argument in DeployMode.from(String) — along with Turkish-locale tests that fail against the unpatched sources. That sounds like the right direction, and I'll take a closer look at the changes themselves on the PR.
Since the workflows there haven't run yet and everything so far has been verified locally on JDK 17, could you ping here once CI has run so we can confirm the results? We can continue the detailed review on the PR and close this issue once it lands.
Thanks — since your read found nothing to change, nothing moved here: the PR head is still 3dc5920e.
On the ping you asked for: I still cannot send it. Check-runs on that head are 0 and the workflow run remains action_required, so CI has not executed — it is waiting for a maintainer to approve the run, which a fork contributor cannot do. I will post the results in this thread as soon as it executes, and we can pick up the review on the PR at that point.
Everything reported so far for this PR is local JDK 17 verification plus spotless:check; the git diff --check cleanliness is confirmed on the committed blobs, not in Actions.
On the CI status: action_required on the Build check does not mean the run is waiting for maintainer approval. For apache/seatunnel the build for a PR runs in the contributor's fork, and the PR's Build check only reports that fork run. On #13081 the check reports "Workflow run detection failed", and sharpca/seatunnel has no workflow runs at all, so there is no gate a maintainer can approve here. The only action_required run on the apache side is Label-when-reviewed, a review-labeling workflow that does not build or test anything.
To get CI running:
Open the Actions tab of your fork and enable GitHub Actions if it shows the enable button.
Select the Build workflow, click Run workflow and pick the PR branch (or push an empty commit).
The PR's Build check adopts the fork run within about 15 minutes.
One gap I found while checking the CLI paths on dev, which #13081 does not touch yet: --checkpoint-history-status is parsed in ClientExecuteCommand with CheckpointStatus.valueOf(clientCommandArgs.getCheckpointHistoryStatus().toUpperCase()). CheckpointStatus has IN_PROGRESS and FAILED, so under tr-TR an input such as failed becomes FAİLED and the command reports "Unsupported checkpoint history status". This is the same class of CLI enum argument as the issue title, so it would be good to fix it in #13081 with Locale.ROOT and add a matching Turkish-locale assertion. If you prefer to keep #13081 as-is, please say so and it can be tracked separately.
Other default-locale conversions I saw in seatunnel-core (for example the Flink checkpoint mode and time characteristic switches in AbstractFlinkRuntimeEnvironment) read job config values rather than CLI arguments, so they are outside this issue and do not need to block #13081.
Once the fork build has run, the detailed review continues on #13081 itself.
Thanks @sharpca. Two points remain before the detailed review can continue on the PR:
CI — as noted above, the PR's Build check reports the workflow run from your fork, and the fork currently has no workflow runs, so there is nothing for a maintainer to approve. Please enable Actions in your fork and run the Build workflow against the PR branch so a run for head 3dc5920e is picked up, then post here once it has executed.
--checkpoint-history-status — this is still parsed with a default-locale toUpperCase() in ClientExecuteCommand. Please let us know whether you want to fix it in the PR with Locale.ROOT plus a Turkish-locale assertion, or have it tracked separately.
The coverage summary you posted reads well; it will be checked against the diff during review on the PR.
Activity
SEZ9 commentedon Nov 1, 2026
Thanks for the detailed report and the reproduction steps. Since you're willing to submit a PR, please go ahead. It would be good for the fix to cover all the conversions listed in your table (the Spark and Flink
--deploy-mode/--targethandling inseatunnel-spark-starter-commonandseatunnel-flink-starter-common, and the-pthandling inseatunnel-starter) so the case conversion no longer depends on the JVM default locale, and to also handle thenullargument case inDeployMode.from(String)that you mentioned. A unit test that runs these conversions under a Turkish default locale would help prevent a regression.sharpca commentedon Nov 1, 2026
Thanks @SEZ9. I opened #13081, which covers every conversion listed in the report: the Spark and Flink
--deploy-mode/--targethandling inseatunnel-spark-starter-commonandseatunnel-flink-starter-common, the-pthandling inseatunnel-starter(connector check and metadata export), and thenullargument ofDeployMode.from(String). The PR adds tests that run these conversions under a Turkish default locale, and I confirmed the new tests fail against the unpatched sources.sharpca commentedon Nov 1, 2026
Thanks. #13081 covers every conversion in the table.
--deploy-mode—SparkDeployModeConvertermatches the value withLocale.ROOT--deploy-mode—FlinkDeployModeConverterusesLocale.ROOT--target—FlinkMasterTargetConverter(--master/--target) usesLocale.ROOT-pt/--plugin-typeinseatunnel-starter— bothConnectorCheckCommandArgsandMetadataExportCommandArgsuseLocale.ROOTDeployMode.from(String)— now returnsOptional.empty()for anullargument instead of throwing, and lower-cases withLocale.ROOTThe dash-to-underscore mapping is kept, so
run-applicationandyarn-sessionstill resolve toRUN_APPLICATIONandYARN_SESSIONunder any locale.Turkish locale tests —
DeployModeTest,SparkCommandArgsConverterTest,FlinkCommandArgsConverterTestandConnectorCheckCommandArgsTesteach parse the arguments withnew Locale("tr", "TR")as the default locale and restore the previous default afterwards.DeployModeTestalso assertsfrom(null)returns empty.One note: the workflows on #13081 are still waiting for a maintainer to approve them (
action_required), so no test has run in CI yet. Everything above was verified locally on JDK 17.SEZ9 commentedon Nov 2, 2026
Thanks @sharpca for the detailed breakdown. From your description, the PR addresses each item in the report — the Spark/Flink
--deploy-modeand--targetconversions,-pt/--plugin-typehandling, and thenullargument inDeployMode.from(String)— along with Turkish-locale tests that fail against the unpatched sources. That sounds like the right direction, and I'll take a closer look at the changes themselves on the PR.Since the workflows there haven't run yet and everything so far has been verified locally on JDK 17, could you ping here once CI has run so we can confirm the results? We can continue the detailed review on the PR and close this issue once it lands.
sharpca commentedon Nov 2, 2026
Thanks — since your read found nothing to change, nothing moved here: the PR head is still
3dc5920e.On the ping you asked for: I still cannot send it. Check-runs on that head are 0 and the workflow run remains
action_required, so CI has not executed — it is waiting for a maintainer to approve the run, which a fork contributor cannot do. I will post the results in this thread as soon as it executes, and we can pick up the review on the PR at that point.Everything reported so far for this PR is local JDK 17 verification plus
spotless:check; thegit diff --checkcleanliness is confirmed on the committed blobs, not in Actions.DanielLeens commentedon Nov 3, 2026
Hi @sharpca, thanks for the follow-up.
On the CI status:
action_requiredon theBuildcheck does not mean the run is waiting for maintainer approval. For apache/seatunnel the build for a PR runs in the contributor's fork, and the PR'sBuildcheck only reports that fork run. On #13081 the check reports "Workflow run detection failed", andsharpca/seatunnelhas no workflow runs at all, so there is no gate a maintainer can approve here. The onlyaction_requiredrun on the apache side isLabel-when-reviewed, a review-labeling workflow that does not build or test anything.To get CI running:
Buildcheck adopts the fork run within about 15 minutes.One gap I found while checking the CLI paths on
dev, which #13081 does not touch yet:--checkpoint-history-statusis parsed inClientExecuteCommandwithCheckpointStatus.valueOf(clientCommandArgs.getCheckpointHistoryStatus().toUpperCase()).CheckpointStatushasIN_PROGRESSandFAILED, so undertr-TRan input such asfailedbecomesFAİLEDand the command reports "Unsupported checkpoint history status". This is the same class of CLI enum argument as the issue title, so it would be good to fix it in #13081 withLocale.ROOTand add a matching Turkish-locale assertion. If you prefer to keep #13081 as-is, please say so and it can be tracked separately.Other default-locale conversions I saw in
seatunnel-core(for example the Flink checkpoint mode and time characteristic switches inAbstractFlinkRuntimeEnvironment) read job config values rather than CLI arguments, so they are outside this issue and do not need to block #13081.Once the fork build has run, the detailed review continues on #13081 itself.
SEZ9 commentedon Nov 4, 2026
Thanks @sharpca. Two points remain before the detailed review can continue on the PR:
CI — as noted above, the PR's
Buildcheck reports the workflow run from your fork, and the fork currently has no workflow runs, so there is nothing for a maintainer to approve. Please enable Actions in your fork and run theBuildworkflow against the PR branch so a run for head3dc5920eis picked up, then post here once it has executed.--checkpoint-history-status— this is still parsed with a default-localetoUpperCase()inClientExecuteCommand. Please let us know whether you want to fix it in the PR withLocale.ROOTplus a Turkish-locale assertion, or have it tracked separately.The coverage summary you posted reads well; it will be checked against the diff during review on the PR.