[PR #6659] [CLOSED] [client] Set routeselector atomic exit node #29775

Open
opened 2026-08-05 08:08:56 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/6659
Author: @pappz
Created: 7/3/2026
Status: Closed

Base: mainHead: fix/routeselector-atomic-exit-node


📝 Commits (10+)

  • 8b7ce33 [client] UI refactor (#6069)
  • 1828df8 [ci] Bump SIGN_PIPE_VER to v0.1.8 (#6477)
  • fcc09f5 [client/ui] Restore netbird-ui.rb.tmpl homebrew cask template (#6478)
  • 8962cff Merge branch 'main' into 0.75.0-branch
  • 27616ff [client] Fix resources dropdown and default-profile delete protection (#6484)
  • e1c5604 [client] Update Wails v3 to v3.0.0-alpha2.106 (#6545)
  • 95de22d [client] Fix stuck Windows tray dark icon on state change (#6532)
  • 317a391 [client] Remove hardcoded autostart from Windows installers (#6544)
  • 1e0e04d Merge branch 'main' into 0.75.0-branch
  • e22976a routeselector: make exit-node reconciliation atomic

📊 Changes

393 files changed (+46678 additions, -6747 deletions)

View changed files

.coderabbit.yaml (+18 -0)
📝 .devcontainer/Dockerfile (+0 -1)
.github/workflows/frontend-ui.yml (+98 -0)
📝 .github/workflows/golang-test-darwin.yml (+9 -1)
📝 .github/workflows/golang-test-linux.yml (+12 -5)
📝 .github/workflows/golang-test-windows.yml (+8 -1)
📝 .github/workflows/golangci-lint.yml (+19 -2)
📝 .github/workflows/release.yml (+58 -23)
📝 .github/workflows/wasm-build-validation.yml (+1 -1)
📝 .golangci.yaml (+10 -0)
📝 .goreleaser.yaml (+2 -0)
📝 .goreleaser_ui.yaml (+20 -6)
📝 .goreleaser_ui_darwin.yaml (+9 -2)
📝 CONTRIBUTING.md (+47 -8)
📝 client/cmd/login.go (+77 -0)
📝 client/cmd/status.go (+7 -0)
📝 client/embed/embed.go (+1 -1)
📝 client/installer.nsis (+52 -49)
📝 client/internal/auth/auth.go (+42 -0)
client/internal/auth/auth_test.go (+80 -0)

...and 80 more files

📄 Description

Describe your changes

Make exit-node reconciliation atomic by moving the full deselect/reselect logic into a single locked RouteSelector.SetExclusiveExitNode method, preventing a concurrent DeselectAllRoutes from being silently undone by an interleaved re-selection of the preferred exit node.

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • This change does not modify the public API, gRPC protocols, functionality behavior, CLI / service flags, or introduce a new feature — OR I have discussed it with the NetBird team beforehand (link the issue / Slack thread in the description). See CONTRIBUTING.md.

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • Bug Fixes
    • Improved exit-node selection so only the preferred exit node remains active when reconciling routes.
    • Kept a global “deselect all” state intact, avoiding unintended re-selection.
    • Made route updates more reliable by applying selection changes atomically.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/6659 **Author:** [@pappz](https://github.com/pappz) **Created:** 7/3/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/routeselector-atomic-exit-node` --- ### 📝 Commits (10+) - [`8b7ce33`](https://github.com/netbirdio/netbird/commit/8b7ce337d86ea5f01ebcf4c62a565ecfa9e7018c) [client] UI refactor (#6069) - [`1828df8`](https://github.com/netbirdio/netbird/commit/1828df81871033f0799b0221396608571b776bc7) [ci] Bump SIGN_PIPE_VER to v0.1.8 (#6477) - [`fcc09f5`](https://github.com/netbirdio/netbird/commit/fcc09f568c09ae9590ee7987cfce2c00fdccb8f9) [client/ui] Restore netbird-ui.rb.tmpl homebrew cask template (#6478) - [`8962cff`](https://github.com/netbirdio/netbird/commit/8962cff2434257b34e21370dfe890c4b8626290a) Merge branch 'main' into 0.75.0-branch - [`27616ff`](https://github.com/netbirdio/netbird/commit/27616ff0045cf31e34ce0c7d8bf980b920a4625f) [client] Fix resources dropdown and default-profile delete protection (#6484) - [`e1c5604`](https://github.com/netbirdio/netbird/commit/e1c560479199cd8edf2256bc585d62205c9909f3) [client] Update Wails v3 to v3.0.0-alpha2.106 (#6545) - [`95de22d`](https://github.com/netbirdio/netbird/commit/95de22d40846f054f40e45ce3081e7de2771c971) [client] Fix stuck Windows tray dark icon on state change (#6532) - [`317a391`](https://github.com/netbirdio/netbird/commit/317a391113d621c481ce22314e2985a51bc969c2) [client] Remove hardcoded autostart from Windows installers (#6544) - [`1e0e04d`](https://github.com/netbirdio/netbird/commit/1e0e04d65fdbe2afb5e4a301f0f81840bf833f37) Merge branch 'main' into 0.75.0-branch - [`e22976a`](https://github.com/netbirdio/netbird/commit/e22976a89e7f2d6c2a5fa4583be9a24b01c63dbf) routeselector: make exit-node reconciliation atomic ### 📊 Changes **393 files changed** (+46678 additions, -6747 deletions) <details> <summary>View changed files</summary> ➕ `.coderabbit.yaml` (+18 -0) 📝 `.devcontainer/Dockerfile` (+0 -1) ➕ `.github/workflows/frontend-ui.yml` (+98 -0) 📝 `.github/workflows/golang-test-darwin.yml` (+9 -1) 📝 `.github/workflows/golang-test-linux.yml` (+12 -5) 📝 `.github/workflows/golang-test-windows.yml` (+8 -1) 📝 `.github/workflows/golangci-lint.yml` (+19 -2) 📝 `.github/workflows/release.yml` (+58 -23) 📝 `.github/workflows/wasm-build-validation.yml` (+1 -1) 📝 `.golangci.yaml` (+10 -0) 📝 `.goreleaser.yaml` (+2 -0) 📝 `.goreleaser_ui.yaml` (+20 -6) 📝 `.goreleaser_ui_darwin.yaml` (+9 -2) 📝 `CONTRIBUTING.md` (+47 -8) 📝 `client/cmd/login.go` (+77 -0) 📝 `client/cmd/status.go` (+7 -0) 📝 `client/embed/embed.go` (+1 -1) 📝 `client/installer.nsis` (+52 -49) 📝 `client/internal/auth/auth.go` (+42 -0) ➕ `client/internal/auth/auth_test.go` (+80 -0) _...and 80 more files_ </details> ### 📄 Description ## Describe your changes Make exit-node reconciliation atomic by moving the full deselect/reselect logic into a single locked RouteSelector.SetExclusiveExitNode method, preventing a concurrent DeselectAllRoutes from being silently undone by an interleaved re-selection of the preferred exit node. ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] This change does **not** modify the public API, gRPC protocols, functionality behavior, CLI / service flags, or introduce a new feature — **OR** I have discussed it with the NetBird team beforehand (link the issue / Slack thread in the description). See [CONTRIBUTING.md](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTING.md#discuss-changes-with-the-netbird-team-first). > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved exit-node selection so only the preferred exit node remains active when reconciling routes. * Kept a global “deselect all” state intact, avoiding unintended re-selection. * Made route updates more reliable by applying selection changes atomically. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 08:08:56 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#29775