Repository navigation
feat(jobs): add JobSummary.release_version and correct the deployment_id meaning - #207
Open
mattmillerai wants to merge 2 commits into
Open
mattmillerai wants to merge 2 commits into
mattmillerai wants to merge 2 commits into
Conversation
…_id meaning The serverless gateway sends release_version on every list item, and it stamps deployment_id from the deployment the job was posted to rather than the release copy that ran it. Lift release_version onto JobSummary (an int, or None; any other type, bool included, raises invalid_response naming the field, the same rule as deployment_id) and rewrite the deployment_id docstring, README and CHANGELOG to the posted-to meaning.
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 38 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Your 131 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
Comment |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @mattmillerai.
Found 2 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 1 |
| 🟢 Low | 1 |
Panel: 6/6 reviewers contributed findings.
The field may be absent on a host that does not send it, and then reads as None; a present value of the wrong type still raises invalid_response. The old wording read as if a wrong-typed value would be tolerated.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).