Repository navigation
ci: bump actions to v5; fix post-close WebSocket send race - #301
Merged
Merged
Conversation
added 2 commits
November 26, 2026 18:52
actions/checkout@v4 and actions/setup-java@v4 target the deprecated Node 20 runtime and are forced onto Node 24; setup-java v4 is also itself deprecated. Upgrade both to v5 (Node 24) across release, build-and-test, and linter workflows to clear the deprecation annotations. Inputs are unchanged.
After a duplex stream is cancelled/disposed, an orphaned RxJava thread still ran the streamingData onComplete finish-task send and reconnect; with no global API key this threw NoApiKeyException, which escaped the unguarded onComplete Action as an RxJava UndeliverableException (the release-run "Can not find api-key." annotation). Guard the onComplete send and the reconnect catch with isClosed so post-close sends/reconnects are quiet and non-throwing, while live -flow failures still surface via emitResponseError. Add a deterministic same-package regression test reproducing the dispose-then-complete race.
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.
Summary
Two CI-hygiene fixes surfaced by the
v2.23.8 Releaserun (45798619666).1. Bump GitHub Actions to v5 (Node 24)
actions/checkoutv4 → v5 andactions/setup-javav4 → v5 acrossrelease.yml,build-and-test.yml, andlinter.yml.java-version,distribution,server-*,gpg-*,fetch-depth,cache).linter.ymlcheckout stays SHA-pinned, bumped to the v5 commitfbc6f3992d24b796d5a048ff273f7fcc4a7b6c09.upload-artifact@v4and other workflow logic untouched.2. Fix post-close WebSocket send race (
fix(protocol))Can not find api-key.error annotation (17 occurrences vs 0 in v2.23.7). Root cause is a race, not a regression (onlyVersion.javachanged between the tags): after a duplex stream is cancelled/disposed, an orphaned RxJava thread still ran the streamingDataonCompletefinish-task send and reconnect; with no global API key in the release env this threwNoApiKeyException, which escaped the unguardedonCompleteAction as an RxJavaUndeliverableException.OkHttpWebSocketClient: guard theonCompletefinish-task send withisClosed+try/catch; early-return quietly from the reconnect catch when closed; downgrade theonNextcatch log to debug when closed. Live-flow failures still surface viaemitResponseError.TestOkHttpWebSocketClientCloseRace) reproducing the dispose-then-complete race; verified it fails before the fix and passes after.Test plan
build-and-test/linterruns no longer emit the Node 20 / setup-java v4 deprecation annotationsgrep -rnE "actions/(checkout|setup-java)@v4" .github/workflows/returns nothingCan not find api-key./UndeliverableExceptionannotationTestOkHttpWebSocketClientCloseRace(2 cases) + duplex/websocket suite (TestFullDuplexApi,TestFullDuplexErrorHandling,TestHalfDuplexWebSocketApi,TestMultimodalDialog,TestSseErrorHandling,TestApiKey) — 33 tests, 0 failures