Repository navigation
feat: deprecate releasing a realtime channel that isn't detached - #728
SimonWoolf wants to merge 1 commit into
Conversation
Specification 6.3.0 replaces RTS4a with RTS4c-e: release() must raise 90011 for a channel that is not INITIALIZED, DETACHED or FAILED, rather than dropping it while it may still be attached. RTS4b lets an SDK keep its existing release until the next major version provided it logs a deprecation warning, so Channels.release now warns when called on a channel in any other state, and still removes it. The channels collection UTS tests are rederived for RTS4c-e, with the RTS4e test gated as an RTS4b-permitted deviation. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. Walkthrough
ChangesChannel Release
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change is mergeable after normal checks; releasing an attached channel remains permitted in this version and now warns callers to detach first. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 13.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. A rabbit checks the channel’s state, Comment |
Implements the RTS4b deprecation from specification 6.3.0 (ably/specification#557).
channels.release(name)currently removes a realtime channel from the collection whatever its state. An attached channel is therefore dropped while it is still attached in the Ably service. From the next major version, releasing a channel that isn'tINITIALIZED,DETACHEDorFAILEDwill raise anAblyExceptionwith code 90011 (RTS4e). As RTS4b permits, this version keeps the current behaviour but logs a deprecation warning telling the user to awaitchannel.detach()before callingrelease().release()docstring.deviations.md.The next-major change is in #729. Reference ably-js PRs: ably/ably-pubsub-js#2322 (deprecation) and ably/ably-pubsub-js#2323 (next major).
🤖 Generated with Claude Code
Summary by CodeRabbit
Behavior Changes
detach()first. The channel is still removed from the collection without being detached.Documentation