mirror of
https://github.com/Comfy-Org/comfy-python-sdk.git
synced 2026-11-04 23:37:47 +00:00
[PR #207] feat(jobs): add JobSummary.release_version and correct the deployment_id meaning #206
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
effort:medium
effort:small
effort:small
effort:trivial
priority:nice-to-have
priority:nice-to-have
priority:recommended
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-python-sdk#206
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-python-sdk/pull/207
Author: @mattmillerai
Created: 10/9/2026
Status: 🔄 Open
Base:
main← Head:mattmiller/be-19947-job-summary-release-version📝 Commits (2)
f44fc19feat(jobs): add JobSummary.release_version and correct the deployment_id meaning9241c1edocs(jobs): say what best-effort means for deployment_id📊 Changes
4 files changed (+86 additions, -11 deletions)
View changed files
📝
CHANGELOG.md(+6 -2)📝
README.md(+8 -3)📝
src/comfy_sdk/jobs.py(+27 -6)📝
tests/test_job_metadata.py(+45 -0)📄 Description
ELI-5
When you list jobs, each one now says which release of the deployment ran it (
release_version). The note ondeployment_idalso gets fixed: it is the deployment you sent the job to, and it stays the same when that deployment moves to a new release. It is not the release copy that ran the job.Summary
JobSummary.release_version: int | Noneis a new field, placed afterdeployment_idand beforemetadata. The dataclass staysfrozen=True, slots=True, and_from_itembuilds it with keyword arguments._from_itemreadsitem.get("release_version"). It accepts anintorNone. Any other type raisesComfyError(code="invalid_response")namingrelease_version, the same ruledeployment_idalready follows. That includes abool, which is anintsubclass and is ruled out on purpose.deployment_iddocstring, README and CHANGELOG now give the posted-to meaning. Because the v2JobListItemcontract does not declare the field, they also say a host may leave it out, in which case it reads asNone. A value that is present but has the wrong type still raisesinvalid_response, as it did before.[Unreleased]JobSummarybullet listsrelease_versionand the new error case. The READMElist_jobssection lists the field.release_version: 3comes through on bothComfy.list_jobsandAsyncComfy.list_jobs.None."3",Trueand3.0each raiseinvalid_responsenamingrelease_version. Each bad-item case runs against both the sync and async clients.Judgment call (error text): the old message said
has a non-string <fields>, which would be wrong for an integer field. Each wrong field now carries its own qualifier, for examplejob list item has a non-string id and a non-integer release_version. When several fields are wrong, the wording is slightly different from before. The code is stillinvalid_response, and each field is still named. The existing tests only check that the field name appears in the message, so they pass unchanged.The change only adds to the API.
list_jobsandJobSummaryare still unreleased.Residual
spec/openapi.yamlin this tree does not declarerelease_versionyet. The integer type comes from the upstream contract change that adds it toJobListItem, which has not been synced here. I did not check the field's type against a synced spec or a live gateway. If the upstream schema turns out not to beinteger, the type check in_from_itemneeds to change to match. A pending spec-sync PR may bring it in.JobSummaryis built from the raw dict rather than the generated models, so that sync does not affect this change either way.tests/integration/test_gateway_e2e.pywas skipped because there are no credentials. Nothing here was checked against a live serverless gateway response.deployment_idin the upstream v2 contract is out of scope and is up to the API owners.Provenance
tests/test_job_metadata.pywas re-run and passed (113).ruff check,ruff format --checkandmypy srcare clean.9241c1eis green, including the 3.10 to 3.13 matrix,build-checkandcodegen-drift.main(cddc298, a Router spec sync), the result merges cleanly and passesruff check,ruff format --check,mypy src, and the job-metadata and Router test modules (400 passed).deployment_id(docs only).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.