feat(submit): update_pending_job tool for editing PENDING submissions

Add an update_pending_job MCP tool that lets callers modify parameters
of a PENDING submission before confirm_submit_job:
  - queue, executor_memory, executor_cores, num_executors
  - app_name
  - extra_args
  - script_path (re-validates file existence and SQL guard)

Only PENDING submissions can be updated; SUBMITTED/CANCELLED/FAILED are
rejected with HTTP 400.
This commit is contained in:
Claude
2026-06-26 16:14:08 +08:00
parent 939f6842d3
commit b8826f8c90
5 changed files with 249 additions and 0 deletions
+14
View File
@@ -75,6 +75,20 @@ class PendingIdRequest(BaseModel):
pending_id: str
class UpdatePendingJobRequest(BaseModel):
pending_id: str
script_path: str | None = Field(
default=None,
description="Optional new absolute path to the PySpark script. If provided, the file must exist and pass SQL guard.",
)
queue: str | None = None
executor_memory: str | None = None
executor_cores: int | None = None
num_executors: int | None = None
app_name: str | None = None
extra_args: dict[str, str] | None = None
class JobIdRequest(BaseModel):
job_id: str