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
@@ -64,10 +64,10 @@ def prepare_submit_job(
*,
connection: str,
script_path: str,
queue: str,
executor_memory: str,
executor_cores: int,
num_executors: int,
queue: str = "default",
executor_memory: str = "4G",
executor_cores: int = 2,
num_executors: int = 2,
app_name: str,
extra_args: dict[str, str] | None = None,
) -> dict[str, object]: