feat: add asset delete - #41
Conversation
|
✅ All contributors have signed the CLA. Thank you! This PR is ready to be merged. |
|
Warning Review limit reached
Next review available in: 6 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAsset deletion is now available through synchronous and asynchronous low-level clients, asset handles, and asset factories. Committed asset handles clear their stored IDs after successful deletion. Tests cover request handling, deletion counts, state clearing, and uncommitted assets. ChangesAsset deletion
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AssetHandle
participant SDKClient
participant ComfyLow
participant AssetAPI
AssetHandle->>SDKClient: Delete committed asset
SDKClient->>ComfyLow: Send DELETE request
ComfyLow->>AssetAPI: DELETE /assets/{asset_id}
AssetAPI-->>ComfyLow: Return HTTP 204
ComfyLow-->>SDKClient: Return success
SDKClient-->>AssetHandle: Clear stored asset ID
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
|
I have read and agree to the Contributor License Agreement |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/comfy_low/transport.py`:
- Around line 344-348: Update the `/api/v2/assets/{id}` definition in
`spec/openapi.yaml` to add a `deleteAsset` DELETE operation with the appropriate
success `204` response and existing error responses, then regenerate the OpenAPI
bindings so synchronous and asynchronous `delete_asset` remain contract-aligned.
In `@tests/conftest.py`:
- Around line 178-188: The test server’s do_DELETE method must model resource
removal instead of only counting requests. Capture the matched asset ID in the
server’s deleted-resource state, make the existing metadata and content GET
handlers return the API’s 404 for deleted IDs, and update both synchronous and
asynchronous instance tests to verify subsequent requests for that ID receive
404 responses.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 61042060-7667-4c9c-bf17-ec7492f06cdb
📒 Files selected for processing (5)
src/comfy_low/transport.pysrc/comfy_sdk/assets.pytests/conftest.pytests/test_assets.pytests/test_async.py
Summary by CodeRabbit
New Features
Bug Fixes
Tests