[PR #712] [CLOSED] Move Login business logic from gRPC API to Accountmanager #12911

Closed
opened 2026-08-05 02:06:59 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/712
Author: @braginini
Created: 3/1/2023
Status: Closed

Base: mainHead: refactor/move_grpcserver_logic_to_account_manager


📝 Commits (10+)

  • d554da2 Move peer login to account manager
  • 34c73f0 Fix account manager mock
  • ac0982b Fix lint issues
  • 551f25b Fix peer host lable generator
  • e74d7ea split api code into smaller pieces
  • e5408c7 change methods to not link
  • daad785 Remove stale peer indices when getting peer by key after removing (#711)
  • 66b8016 Fix account test
  • b7ad425 Fix peer test
  • a47c516 Fix management IT

📊 Changes

11 files changed (+489 additions, -358 deletions)

View changed files

📝 management/server/account.go (+2 -2)
📝 management/server/account_test.go (+9 -16)
📝 management/server/file_store.go (+23 -1)
📝 management/server/file_store_test.go (+38 -0)
📝 management/server/grpcserver.go (+72 -186)
📝 management/server/http/handler.go (+106 -63)
📝 management/server/management_test.go (+3 -2)
📝 management/server/mock_server/account_mock.go (+18 -9)
📝 management/server/peer.go (+207 -63)
📝 management/server/peer_test.go (+8 -16)
📝 management/server/status/error.go (+3 -0)

📄 Description

Describe your changes

The Management gRPC API has too much business logic happening while it has to be in the Account manager.
This also needs to make more requests to the store through the account manager.

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/712 **Author:** [@braginini](https://github.com/braginini) **Created:** 3/1/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `refactor/move_grpcserver_logic_to_account_manager` --- ### 📝 Commits (10+) - [`d554da2`](https://github.com/netbirdio/netbird/commit/d554da29519f97baae0fc650f150af0e24dcc23d) Move peer login to account manager - [`34c73f0`](https://github.com/netbirdio/netbird/commit/34c73f0b34d61dbc738fb7c70529120de3f189a5) Fix account manager mock - [`ac0982b`](https://github.com/netbirdio/netbird/commit/ac0982bb8da535f087f3126a9d936505cad1fbfd) Fix lint issues - [`551f25b`](https://github.com/netbirdio/netbird/commit/551f25b7677561f0f2306281783d2e8038a3d6c9) Fix peer host lable generator - [`e74d7ea`](https://github.com/netbirdio/netbird/commit/e74d7eab6bd1ae4d53e06447be516c38ddad03eb) split api code into smaller pieces - [`e5408c7`](https://github.com/netbirdio/netbird/commit/e5408c7f3c82aea07d433b9ac37d252cc10299e0) change methods to not link - [`daad785`](https://github.com/netbirdio/netbird/commit/daad7855386d1c800aebe1eec020d823f829131a) Remove stale peer indices when getting peer by key after removing (#711) - [`66b8016`](https://github.com/netbirdio/netbird/commit/66b8016632f37e1737c9176b0d3bbd9ae7d7b58c) Fix account test - [`b7ad425`](https://github.com/netbirdio/netbird/commit/b7ad425c13751d2de82c7c42258eb5e08cd0ff0b) Fix peer test - [`a47c516`](https://github.com/netbirdio/netbird/commit/a47c516b9c294a44c82babb28055756f9135f312) Fix management IT ### 📊 Changes **11 files changed** (+489 additions, -358 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account.go` (+2 -2) 📝 `management/server/account_test.go` (+9 -16) 📝 `management/server/file_store.go` (+23 -1) 📝 `management/server/file_store_test.go` (+38 -0) 📝 `management/server/grpcserver.go` (+72 -186) 📝 `management/server/http/handler.go` (+106 -63) 📝 `management/server/management_test.go` (+3 -2) 📝 `management/server/mock_server/account_mock.go` (+18 -9) 📝 `management/server/peer.go` (+207 -63) 📝 `management/server/peer_test.go` (+8 -16) 📝 `management/server/status/error.go` (+3 -0) </details> ### 📄 Description ## Describe your changes The Management gRPC API has too much business logic happening while it has to be in the Account manager. This also needs to make more requests to the store through the account manager. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] 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 02:06:59 -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#12911