[PR #3194] [CLOSED] [management] optimize peer expiration #21865

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/3194
Author: @pascal-fischer
Created: 1/16/2025
Status: Closed

Base: mainHead: refactor/optimize-peer-expiration


📝 Commits (10+)

  • 389c961 Refactor setup key handling to use store methods
  • 78044c2 add lock to get account groups
  • 1a5f3c6 add check for regular user
  • 931521d get only required groups for auto-group validation
  • f8b5eed add account lock and return auto groups map on validation
  • 106fc75 refactor account peers update
  • 0a70e4c Refactor groups to use store methods
  • 8126d95 refactor GetGroupByID and add NewGroupNotFoundError
  • ac05f69 fix tests
  • 40af1a5 Merge branch 'feature/get-account-refactoring' into setupkey-get-account-refactoring

📊 Changes

36 files changed (+2162 additions, -1383 deletions)

View changed files

📝 .github/workflows/golang-test-linux.yml (+3 -3)
📝 go.mod (+1 -1)
📝 go.sum (+2 -2)
📝 management/client/client_test.go (+5 -2)
📝 management/server/account.go (+52 -67)
📝 management/server/account_test.go (+18 -25)
📝 management/server/ephemeral.go (+20 -27)
📝 management/server/ephemeral_test.go (+7 -11)
📝 management/server/groups/manager.go (+34 -25)
📝 management/server/http/handlers/networks/handler.go (+2 -2)
📝 management/server/http/handlers/networks/resources_handler.go (+15 -10)
📝 management/server/http/handlers/peers/peers_handler.go (+31 -41)
📝 management/server/http/handlers/peers/peers_handler_test.go (+80 -61)
📝 management/server/http/testing/benchmarks/peers_handler_benchmark_test.go (+31 -31)
📝 management/server/http/testing/benchmarks/setupkeys_handler_benchmark_test.go (+34 -34)
📝 management/server/http/testing/benchmarks/users_handler_benchmark_test.go (+14 -14)
📝 management/server/integrated_validator.go (+27 -3)
📝 management/server/integrated_validator/interface.go (+1 -1)
📝 management/server/management_proto_test.go (+5 -5)
📝 management/server/management_suite_test.go (+11 -11)

...and 16 more files

📄 Description

Describe your changes

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

🔄 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/3194 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 1/16/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `refactor/optimize-peer-expiration` --- ### 📝 Commits (10+) - [`389c961`](https://github.com/netbirdio/netbird/commit/389c9619afe8b6d129a12d137bf332491503bb83) Refactor setup key handling to use store methods - [`78044c2`](https://github.com/netbirdio/netbird/commit/78044c226d9240edcdd5bb180aaab1da86f442e4) add lock to get account groups - [`1a5f3c6`](https://github.com/netbirdio/netbird/commit/1a5f3c653c4b78a5c52bca9bba74c966fbd7495c) add check for regular user - [`931521d`](https://github.com/netbirdio/netbird/commit/931521d505b012f45dcf5bcb5de0ee07f0c5b876) get only required groups for auto-group validation - [`f8b5eed`](https://github.com/netbirdio/netbird/commit/f8b5eedd382d8a218517cf7c7b552f3a0dd8ee3d) add account lock and return auto groups map on validation - [`106fc75`](https://github.com/netbirdio/netbird/commit/106fc759365d535db529d93c9c1ad0324b2ccff6) refactor account peers update - [`0a70e4c`](https://github.com/netbirdio/netbird/commit/0a70e4c5d45292223c78427984fb470aaf0a9a40) Refactor groups to use store methods - [`8126d95`](https://github.com/netbirdio/netbird/commit/8126d953166ddfa79950469f42d0a8dc5084ce71) refactor GetGroupByID and add NewGroupNotFoundError - [`ac05f69`](https://github.com/netbirdio/netbird/commit/ac05f69131651fded5f6a304b7dbe2b517a72b31) fix tests - [`40af1a5`](https://github.com/netbirdio/netbird/commit/40af1a50e3e94732c1524f2330b688473d4b6212) Merge branch 'feature/get-account-refactoring' into setupkey-get-account-refactoring ### 📊 Changes **36 files changed** (+2162 additions, -1383 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/golang-test-linux.yml` (+3 -3) 📝 `go.mod` (+1 -1) 📝 `go.sum` (+2 -2) 📝 `management/client/client_test.go` (+5 -2) 📝 `management/server/account.go` (+52 -67) 📝 `management/server/account_test.go` (+18 -25) 📝 `management/server/ephemeral.go` (+20 -27) 📝 `management/server/ephemeral_test.go` (+7 -11) 📝 `management/server/groups/manager.go` (+34 -25) 📝 `management/server/http/handlers/networks/handler.go` (+2 -2) 📝 `management/server/http/handlers/networks/resources_handler.go` (+15 -10) 📝 `management/server/http/handlers/peers/peers_handler.go` (+31 -41) 📝 `management/server/http/handlers/peers/peers_handler_test.go` (+80 -61) 📝 `management/server/http/testing/benchmarks/peers_handler_benchmark_test.go` (+31 -31) 📝 `management/server/http/testing/benchmarks/setupkeys_handler_benchmark_test.go` (+34 -34) 📝 `management/server/http/testing/benchmarks/users_handler_benchmark_test.go` (+14 -14) 📝 `management/server/integrated_validator.go` (+27 -3) 📝 `management/server/integrated_validator/interface.go` (+1 -1) 📝 `management/server/management_proto_test.go` (+5 -5) 📝 `management/server/management_suite_test.go` (+11 -11) _...and 16 more files_ </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ### 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 --- <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 05:09:02 -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#21865