fix(generate): skip deprecated partner endpoints in the openapi registry (BE-4298)#583
fix(generate): skip deprecated partner endpoints in the openapi registry (BE-4298)#583jojodecayz wants to merge 1 commit into
Conversation
`_registry()` built an Endpoint for every allowlisted `/proxy` op with no
deprecation check, so a retired endpoint would surface through `comfy generate`
(list + run) if it lingered in the allowlist or was deprecated upstream after a
`generate refresh`. comfy-api flags deprecation in the operation SUMMARY, not
the machine `deprecated` flag.
Mirrors the Cloud MCP partner-catalog generator's deprecation filter for
cross-surface parity.
- Add `_is_deprecated_op(op)`: true when `op.deprecated is True` OR the SUMMARY
matches /deprecated/i. Summary-only (not description) is deliberate — the live
`stability/.../generate/sd3` endpoint is current ("Stable Diffusion 3.5") yet
its description mentions the older SD 3.0 API being deprecated; a
description-wide scan would wrongly drop it.
- Skip deprecated ops in `_registry()`, same silent-skip contract as the
existing missing-node case.
- Tests: `_is_deprecated_op` cases incl. the sd3 false-positive guard, and a
registry test proving a deprecated allowlisted endpoint is dropped while its
live sibling survives.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🎉 Thank you for your contribution, we really appreciate it! 🎉 Like many open source projects, we require contributors to sign our Contributor License Agreement (CLA). A CLA makes the ownership of contributions explicit, so contributors and the project share a clear understanding of how the code can be used. By signing, you:
CLAs are standard practice across major open source projects including those under the Apache Software Foundation and the Linux Foundation. Ours is based on the Apache Software Foundation's CLA. Most importantly, it would enable us to relicense the project under a more permissive license in the future, giving the project and its community greater flexibility. ✍ To sign, please post a new comment on this PR with exactly the following text: ✍ I have read and agree to the Contributor License Agreement You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughChangesDeprecated endpoint filtering
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
comfy_cli/command/generate/spec.py's_registry()built anEndpointfor every allowlisted/proxyop with no deprecation check, so a retired endpoint would surface throughcomfy generate(list + run) if it lingered in the allowlist or was deprecated upstream after agenerate refresh. comfy-api flags deprecation in the operationsummary, not the machinedeprecatedflag.Mirrors the Cloud MCP partner-catalog generator's deprecation filter for cross-surface parity (Comfy-Org/comfy-cloud-mcp-server#805).
Change
_is_deprecated_op(op):op.deprecated is TrueOR the summary matches/deprecated/i. Summary-only (not description) is deliberate — the livestability/.../generate/sd3endpoint is current ("Stable Diffusion 3.5") yet its description mentions the older SD 3.0 API being deprecated; a description-wide scan would wrongly drop it._registry(), same silent-skip contract as the existing missing-node case.Tests
_is_deprecated_opcases incl. the sd3 false-positive guard.All 18 tests in
test_spec.pypass;ruff check+ruff formatclean.Part of BE-4298. Companion Cloud MCP PR: Comfy-Org/comfy-cloud-mcp-server#805.
🤖 Generated with Claude Code