Repository navigation
Conversation
The callback also fires once per outage while the socket keeps retrying against an unreachable server, so "failure" wrongly suggested the socket gave up. Rename the socket option and CoderApi parameter to onConnectionProblem, its reason type to ConnectionProblemReason, and the buffer method it is wired to (an action, not an event) to flushForConnectionProblem. Also fix the buffer method's doc, which still said it only runs on a terminal failure. No behavior change.
Collaborator
|
Superseded by #1144 |
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.
Follow-up to #1132.
onConnectionFailurewas a confusing name. Since #1132 the callback also fires once per outage while the socket keeps retrying against an unreachable server, so "failure" suggested the socket had given up when it hadn't (see #1132 (comment)).Renames
onConnectionFailure(socket option,CoderApiparam/field)onConnectionProblemreconnectingWebSocket.ts,coderApi.tsConnectionFailureReasonConnectionProblemReasonreconnectingWebSocket.ts,coderApi.tsNOOP_CONNECTION_FAILURENOOP_CONNECTION_PROBLEMreconnectingWebSocket.tsConnectionLogBuffer.onConnectionFailure/BufferingLogger.onConnectionFailureflushForConnectionProblemlogBuffer.ts, wired inextension.tsandremote.tsThe buffer side gets a verb name because it performs an action (format
<reason> <route>and flush) rather than reporting an event. Its doc no longer says it only runs on a terminal failure.Tests and mocks are updated to match. No behavior change.
Testing
pnpm format:check,pnpm typecheck,pnpm lintclean.reconnectingWebSocket,coderApi,logBuffer,commands.telemetry,commands.supportBundle,remotesuites pass.🤖 Generated with Coder Agents on behalf of @aqandrew.