Skip to content

Swartzn/fix/remote node connection handler#333

Open
swartzn wants to merge 3 commits into
mainfrom
swartzn/fix/remote-node-connection-handler
Open

Swartzn/fix/remote node connection handler#333
swartzn wants to merge 3 commits into
mainfrom
swartzn/fix/remote-node-connection-handler

Conversation

@swartzn

@swartzn swartzn commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This patch does solidifies the worker connect/connection handler behavior. The connection handler should only stop trying to reconnect to the worker when remote itself is shutting down. So I propose two alternatives with a preference for the second,

  1. Redefine retry in the grpcClientHandler interface's connect function to isErrTransient. This keeps the beesync connection code the same but realigns the interface with the expected behavior. This allows us to cleanly adjust remote's worker connection handler so that there are two error types: 1) transient errors (rpc/network) and 2) non-transient errors (version/config). Keeping these error types separate allows for a fixed retry delay for the non-transient errors.

    • To see this implementation, just look at the first commit.
  2. Remove retry/isErrTransient altogether from the grpcClientHandler interface's connect function. This unifies the errors so that they are all retried under the same exponential backoff mechanism.

    • To see this implementation, look at all the changes together.

What does this PR do / why do we need it?

Required for all PRs.

  • Fixes the remote worker node shutdown.
  • Aligns grpcClientHandler connect semantics with the expected behavior.

Related Issue(s)

Required when applicable.

Where should the reviewer(s) start reviewing this?

Only required for larger PRs when this may not be immediately obvious.

Are there any specific topics we should discuss before merging?

Not required.

What are the next steps after this PR?

Not required.

Checklist before merging:

Required for all PRs.

When creating a PR these are items to keep in mind that cannot be checked by GitHub actions:

  • Documentation:
    • Does developer documentation (code comments, readme, etc.) need to be added or updated?
    • Does the user documentation need to be expanded or updated for this change?
  • Testing:
    • Does this functionality require changing or adding new unit tests?
    • Does this functionality require changing or adding new integration tests?
  • Git Hygiene:

For more details refer to the Go coding standards and the pull request process.

@swartzn swartzn requested a review from a team as a code owner June 11, 2026 12:51
@swartzn swartzn mentioned this pull request Jun 11, 2026
9 tasks
@iamjoemccormick iamjoemccormick added the bug Something isn't working label Jun 16, 2026
@swartzn swartzn force-pushed the swartzn/fix/remote-node-connection-handler branch from b533c69 to 2e9785c Compare June 22, 2026 11:28
Fix remote worker handler's shutdown process.
Fix non-transient connection errors so that it retries after a fixed period of time.

Change grpcClientHandler connect semantics from retry to isErrTransient
to match expected behavior.
@swartzn swartzn force-pushed the swartzn/fix/remote-node-connection-handler branch from 2e9785c to 850a4c5 Compare July 14, 2026 20:34
@swartzn swartzn force-pushed the swartzn/fix/remote-node-connection-handler branch from 850a4c5 to dea0057 Compare July 14, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants