[PR #4256] [CLOSED] Feature: Auto-update client #24989

Open
opened 2026-08-05 06:09:23 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/4256
Author: @mohamed-essam
Created: 7/30/2025
Status: Closed

Base: mainHead: feat/auto-upgrade


📝 Commits (10+)

  • bc59749 Feature: Auto-update client
  • c632878 Resolve comments
  • 762b9b7 Restructure version.Update to use channel
  • 84501a3 Fix deadlock issues
  • 58d4812 Define constants for version semantics
  • d2e198b Fix lint
  • 59ae92c Refactor handleAutoUpdateVersion to outside handleSync
  • 6025eb1 Add unit tests
  • ecf1e90 Merge branch 'main' into feat/auto-upgrade
  • ec47a84 Remove testing.T.Context() as it's added in go1.24

📊 Changes

24 files changed (+1680 additions, -516 deletions)

View changed files

📝 client/internal/connect.go (+4 -0)
📝 client/internal/engine.go (+56 -0)
client/internal/updatemanager/manager.go (+386 -0)
client/internal/updatemanager/manager_test.go (+213 -0)
client/internal/updatemanager/update_darwin.go (+118 -0)
client/internal/updatemanager/update_freebsd.go (+10 -0)
client/internal/updatemanager/update_js.go (+10 -0)
client/internal/updatemanager/update_linux.go (+10 -0)
client/internal/updatemanager/update_windows.go (+96 -0)
📝 client/ui/client_ui.go (+57 -2)
📝 management/internals/server/server.go (+1 -1)
📝 management/server/account.go (+11 -1)
📝 management/server/activity/codes.go (+5 -0)
📝 management/server/grpcserver.go (+7 -3)
📝 management/server/http/handlers/accounts/accounts_handler.go (+60 -34)
📝 management/server/http/handlers/accounts/accounts_handler_test.go (+28 -0)
📝 management/server/peer.go (+1 -0)
📝 management/server/types/settings.go (+4 -0)
📝 shared/management/http/api/openapi.yml (+4 -0)
📝 shared/management/http/api/types.gen.go (+3 -0)

...and 4 more files

📄 Description

Describe your changes

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)
  • Extended the README / documentation, if necessary
  • Documentation is not needed

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

Summary by CodeRabbit

  • New Features

    • Configurable auto-update: clients can auto-update to latest, a specific version, or be disabled; initial auto-update applied at startup.
    • Update progress UI: displays live progress during client upgrades.
    • Platform update support: macOS, Windows, Linux (and placeholders for other targets).
  • Server & Sync

    • Management surfaces auto-update settings in sync payloads and account APIs; emits events when account auto-update version changes.
  • Tests

    • Added coverage for update manager and version decision logic
  • Documentation

    • auto_update_version exposed in account settings API

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 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/4256 **Author:** [@mohamed-essam](https://github.com/mohamed-essam) **Created:** 7/30/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/auto-upgrade` --- ### 📝 Commits (10+) - [`bc59749`](https://github.com/netbirdio/netbird/commit/bc59749859347d430f5c882411049dbd77950b5d) Feature: Auto-update client - [`c632878`](https://github.com/netbirdio/netbird/commit/c6328788cabd65476f825a6427a7ddddd596474c) Resolve comments - [`762b9b7`](https://github.com/netbirdio/netbird/commit/762b9b7b564a45f3e6943dd945fe0f155aa737a8) Restructure version.Update to use channel - [`84501a3`](https://github.com/netbirdio/netbird/commit/84501a3f56728c8f08ae1f38ba8233da6f4e3281) Fix deadlock issues - [`58d4812`](https://github.com/netbirdio/netbird/commit/58d48127e03ae80ad58163c1d6ea8d1acc79575a) Define constants for version semantics - [`d2e198b`](https://github.com/netbirdio/netbird/commit/d2e198bd76c656e927d40f32cbdd127d7eca334f) Fix lint - [`59ae92c`](https://github.com/netbirdio/netbird/commit/59ae92cf8fb93b65037650235582ebba807c75ad) Refactor handleAutoUpdateVersion to outside handleSync - [`6025eb1`](https://github.com/netbirdio/netbird/commit/6025eb1962f7d4b361548a3668854e97bcc18356) Add unit tests - [`ecf1e90`](https://github.com/netbirdio/netbird/commit/ecf1e9013ec7cd349ccad783a4e1d90013053a5c) Merge branch 'main' into feat/auto-upgrade - [`ec47a84`](https://github.com/netbirdio/netbird/commit/ec47a84afec5a25c0fd3c45f26241828b7cda447) Remove testing.T.Context() as it's added in go1.24 ### 📊 Changes **24 files changed** (+1680 additions, -516 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/connect.go` (+4 -0) 📝 `client/internal/engine.go` (+56 -0) ➕ `client/internal/updatemanager/manager.go` (+386 -0) ➕ `client/internal/updatemanager/manager_test.go` (+213 -0) ➕ `client/internal/updatemanager/update_darwin.go` (+118 -0) ➕ `client/internal/updatemanager/update_freebsd.go` (+10 -0) ➕ `client/internal/updatemanager/update_js.go` (+10 -0) ➕ `client/internal/updatemanager/update_linux.go` (+10 -0) ➕ `client/internal/updatemanager/update_windows.go` (+96 -0) 📝 `client/ui/client_ui.go` (+57 -2) 📝 `management/internals/server/server.go` (+1 -1) 📝 `management/server/account.go` (+11 -1) 📝 `management/server/activity/codes.go` (+5 -0) 📝 `management/server/grpcserver.go` (+7 -3) 📝 `management/server/http/handlers/accounts/accounts_handler.go` (+60 -34) 📝 `management/server/http/handlers/accounts/accounts_handler_test.go` (+28 -0) 📝 `management/server/peer.go` (+1 -0) 📝 `management/server/types/settings.go` (+4 -0) 📝 `shared/management/http/api/openapi.yml` (+4 -0) 📝 `shared/management/http/api/types.gen.go` (+3 -0) _...and 4 more files_ </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ## Stack <!-- branch-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) - [ ] Extended the README / documentation, if necessary - [x] Documentation is **not needed** > 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). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Configurable auto-update: clients can auto-update to latest, a specific version, or be disabled; initial auto-update applied at startup. * Update progress UI: displays live progress during client upgrades. * Platform update support: macOS, Windows, Linux (and placeholders for other targets). * **Server & Sync** * Management surfaces auto-update settings in sync payloads and account APIs; emits events when account auto-update version changes. * **Tests** * Added coverage for update manager and version decision logic * **Documentation** * auto_update_version exposed in account settings API <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- 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 06:09:23 -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#24989