feat(submit): require explicit confirmation for all prepare_submit_job params

Remove defaults from queue, executor_memory, executor_cores,
num_executors, and app_name in prepare_submit_job. All must now be
explicitly confirmed by the caller.

Also add extra_args to the PendingSubmission snapshot so users can
confirm non-conf spark-submit flags (e.g. --jars, --py-files) at
prepare time; confirm_submit_job passes them through to
build_spark_submit_command.

This is an intentional breaking change to the MCP tool contract:
callers can no longer rely on implicit defaults.
This commit is contained in:
Claude
2026-06-26 15:12:14 +08:00
parent da9ba657f3
commit 4b07617af0
9 changed files with 330 additions and 49 deletions
+23 -7
View File
@@ -33,9 +33,9 @@ class SaveConnectionRequest(BaseModel):
class PrepareSubmitJobRequest(BaseModel):
connection: str
app_name: str | None = Field(
default=None,
description="Optional human-readable application name for tracking the pending submission.",
app_name: str = Field(
...,
description="Human-readable application name for tracking the pending submission.",
)
script_path: str = Field(
...,
@@ -49,10 +49,26 @@ class PrepareSubmitJobRequest(BaseModel):
"if the path is missing or not a file."
),
)
queue: str = "default"
executor_memory: str = "4G"
executor_cores: int = 2
num_executors: int = 2
queue: str = Field(
...,
description="YARN queue to submit to. Must be explicitly confirmed by the caller.",
)
executor_memory: str = Field(
...,
description="Executor memory, e.g. '4G'. Must be explicitly confirmed by the caller.",
)
executor_cores: int = Field(
...,
description="Number of cores per executor. Must be explicitly confirmed by the caller.",
)
num_executors: int = Field(
...,
description="Total number of executors. Must be explicitly confirmed by the caller.",
)
extra_args: dict[str, str] | None = Field(
default=None,
description="Additional spark-submit flags (e.g. jars, py-files) confirmed at prepare time.",
)
class PendingIdRequest(BaseModel):