Repository navigation
Deprecate releasing a realtime channel that isn't detached (RTS4b) - #1250
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughChannel release removes and marks the channel as released. It logs a deprecation warning for states other than INITIALIZED, DETACHED, or FAILED, then continues cleanup. Documentation describes the deprecation and planned error in the next major version. Tests cover release across channel states. ChangesChannel release behavior
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
0 open findings
What changed in this PR
Deprecates releasing realtime channels that are not in terminal states while preserving current behavior.
Changes:
- Adds deprecation warnings for non-terminal channel releases.
- Updates Java and Kotlin documentation.
- Adds release and warning tests.
| File | Description |
|---|---|
pubsub-adapter/src/main/kotlin/com/ably/pubsub/Channels.kt |
Updates release KDoc. |
lib/src/test/kotlin/io/ably/lib/uts/unit/realtime/ChannelsCollectionTest.kt |
Adds release behavior and warning tests. |
lib/src/main/java/io/ably/lib/realtime/AblyRealtime.java |
Adds deprecation warning logic. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@coderabbitai review |
|
17b57f4 to
3462e23
Compare
Spec 6.3.0 deletes RTS4a, under which release() detaches the channel and then removes it, and replaces it with RTS4e, under which releasing a channel that isn't INITIALIZED, DETACHED or FAILED raises 90011 instead. RTS4b lets SDKs that already implement the old behaviour keep it until their next major version, provided they log a deprecation warning when release() is called on a channel in any other state. Also add UTS-derived tests for RTS4c and RTS4d, and a test for the deprecation warning. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3462e23 to
73a370a
Compare
Implements the RTS4b deprecation from spec 6.3.0 (ably/specification#557).
Spec 6.3.0 replaces RTS4a, where
channels.release()implicitly detaches the channel, with RTS4e, where releasing a channel that isn'tINITIALIZED,DETACHEDorFAILEDis an error (90011). This SDK keeps the current behaviour until the next major version but now logs a deprecation warning whenrelease()is called on a channel in any other state. To avoid the warning, callchannel.detach()and wait for it to complete before callingchannels.release(name).AblyRealtime.Channels.releasefor non-terminal states.release()docs (javadoc and the pubsub-adapter KDoc).The behaviour change for the next major is in #1251. 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