fix(models): make PendingSubmission.app_name optional for backward compat

Older pending records (created before app_name was required) may not
have the field. If such a record exists in the date-sharded pending
store, any operation that loads the store fails Pydantic validation and
blocks prepare/list/get/cancel.

Make app_name optional with default None on the persistence model while
keeping it required in PrepareSubmitJobRequest, so new submissions still
must provide it but old records can be loaded and cancelled.
This commit is contained in:
Claude
2026-06-26 15:54:48 +08:00
parent a613c7bdb8
commit 0b4ad578e4
+1 -1
View File
@@ -86,7 +86,7 @@ class Connection(BaseModel):
class PendingSubmission(BaseModel):
pending_id: str
app_name: str
app_name: str | None = None
connection: str
master: str