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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user