feat(submit): configurable confirm retries and idempotent confirm
Harden confirm_submit_job for unreliable test environments and transient spark-submit failures: - Add confirm_max_retries and confirm_retry_delay_seconds settings (env-configurable). - SUBMITTED pending returns cached result without re-running spark-submit. - FAILED pending is reset to PENDING and retried. - CANCELLED pending is still rejected. - On success, persist pending as SUBMITTED before creating the in-memory Job so a job_store failure cannot leave the record as PENDING while the YARN app is already running. - Persist tracking_url on PendingSubmission for idempotent returns. Tests cover retry-then-success, max-retries-exceeded, idempotency, FAILED reset, and pending-saved-before-job-store.
This commit is contained in:
@@ -87,6 +87,7 @@ class Connection(BaseModel):
|
||||
class PendingSubmission(BaseModel):
|
||||
pending_id: str
|
||||
app_name: str
|
||||
|
||||
connection: str
|
||||
master: str
|
||||
deploy_mode: str
|
||||
@@ -103,3 +104,4 @@ class PendingSubmission(BaseModel):
|
||||
error: str | None = None
|
||||
job_id: str | None = None
|
||||
application_id: str | None = None
|
||||
tracking_url: str | None = None
|
||||
|
||||
Reference in New Issue
Block a user