feat(submit): confirm defaults instead of removing them

Restore defaults for queue/executor_memory/executor_cores/num_executors
in prepare_submit_job, but require the caller to explicitly confirm
them. If any defaulted field is omitted, the route returns HTTP 400
listing the defaults and asks the caller to resubmit with explicit
values.

app_name remains required (no meaningful default). extra_args remains
optional.

Tests cover rejection of unconfirmed defaults and acceptance of
explicitly confirmed defaults.
This commit is contained in:
Claude
2026-06-26 15:16:43 +08:00
parent 4b07617af0
commit f170c3045b
6 changed files with 103 additions and 9 deletions
+4 -4
View File
@@ -50,19 +50,19 @@ class PrepareSubmitJobRequest(BaseModel):
),
)
queue: str = Field(
...,
default="default",
description="YARN queue to submit to. Must be explicitly confirmed by the caller.",
)
executor_memory: str = Field(
...,
default="4G",
description="Executor memory, e.g. '4G'. Must be explicitly confirmed by the caller.",
)
executor_cores: int = Field(
...,
default=2,
description="Number of cores per executor. Must be explicitly confirmed by the caller.",
)
num_executors: int = Field(
...,
default=2,
description="Total number of executors. Must be explicitly confirmed by the caller.",
)
extra_args: dict[str, str] | None = Field(