[PR #3575] [MERGED] [management] fix extend call and move config to types #20857

Closed
opened 2026-08-05 05:07:47 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/3575
Author: @mlsmaycon
Created: 3/25/2025
Status: Merged
Merged: 3/27/2025
Merged by: @mlsmaycon

Base: mainHead: fix/export-mgmt-config-url


📝 Commits (9)

  • 80d1aa4 export management config path
  • dc8aac6 move relay config and management config path to types
  • e58240b move management config to types package
  • 7259e76 stop passing config on update peers
  • f0dd6c6 use latest integration code
  • 8af6aa9 sync go sum
  • 4a3b8ef update calls
  • ae76c1c remove duplicated toNetbirdConfig and empty config
  • d0c6258 add update map tests

📊 Changes

25 files changed (+238 additions, -170 deletions)

View changed files

📝 client/cmd/testutil_test.go (+3 -2)
📝 client/internal/engine_test.go (+5 -5)
📝 client/server/server_test.go (+5 -4)
📝 go.mod (+1 -1)
📝 go.sum (+2 -2)
📝 management/client/client_test.go (+1 -1)
📝 management/cmd/management.go (+12 -10)
📝 management/cmd/root.go (+2 -2)
📝 management/server/account_test.go (+10 -10)
📝 management/server/grpcserver.go (+17 -15)
📝 management/server/management_proto_test.go (+22 -22)
📝 management/server/management_test.go (+8 -2)
📝 management/server/metrics/selfhosted.go (+1 -2)
📝 management/server/metrics/selfhosted_test.go (+3 -4)
📝 management/server/peer.go (+2 -2)
📝 management/server/peer_test.go (+53 -6)
📝 management/server/store/file_store.go (+2 -2)
📝 management/server/store/sql_store.go (+10 -10)
📝 management/server/store/sql_store_test.go (+15 -15)
📝 management/server/store/store.go (+25 -32)

...and 5 more files

📄 Description

Describe your changes

This PR fixes configuration inconsistencies and updates the store engine type usage throughout the management code. Key changes include:

  • Replacing outdated server.Config references with types.Config and updating related flag variables (e.g. types.MgmtConfigPath).
  • Converting engine constants (SqliteStoreEngine, PostgresStoreEngine, MysqlStoreEngine) to use types.Engine for consistent type–safety.
  • Adjusting various test and migration code paths to correctly reference the new configuration and engine types.

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/3575 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 3/25/2025 **Status:** ✅ Merged **Merged:** 3/27/2025 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `fix/export-mgmt-config-url` --- ### 📝 Commits (9) - [`80d1aa4`](https://github.com/netbirdio/netbird/commit/80d1aa451634a5e15658a860b7dbce138f87e526) export management config path - [`dc8aac6`](https://github.com/netbirdio/netbird/commit/dc8aac6549d0d48a8f9c3a5bc8183a147bd86e61) move relay config and management config path to types - [`e58240b`](https://github.com/netbirdio/netbird/commit/e58240b21869c2e121fec5ac6c151150de529e6a) move management config to types package - [`7259e76`](https://github.com/netbirdio/netbird/commit/7259e76a9cbde042068eb46abdc0f6dd4f220112) stop passing config on update peers - [`f0dd6c6`](https://github.com/netbirdio/netbird/commit/f0dd6c6a01c3b5838cc736900682aa201f5893e6) use latest integration code - [`8af6aa9`](https://github.com/netbirdio/netbird/commit/8af6aa9ebbd4b6f3a364cf10df8c92cd1a1265c6) sync go sum - [`4a3b8ef`](https://github.com/netbirdio/netbird/commit/4a3b8ef2ff5421832f45555ceb52d87f2c08d1ab) update calls - [`ae76c1c`](https://github.com/netbirdio/netbird/commit/ae76c1c9aeec340dcafa97e8b856ba88ad9a8cc0) remove duplicated toNetbirdConfig and empty config - [`d0c6258`](https://github.com/netbirdio/netbird/commit/d0c6258036f6e277a926ed4088ac9eb3e3cfe54d) add update map tests ### 📊 Changes **25 files changed** (+238 additions, -170 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/testutil_test.go` (+3 -2) 📝 `client/internal/engine_test.go` (+5 -5) 📝 `client/server/server_test.go` (+5 -4) 📝 `go.mod` (+1 -1) 📝 `go.sum` (+2 -2) 📝 `management/client/client_test.go` (+1 -1) 📝 `management/cmd/management.go` (+12 -10) 📝 `management/cmd/root.go` (+2 -2) 📝 `management/server/account_test.go` (+10 -10) 📝 `management/server/grpcserver.go` (+17 -15) 📝 `management/server/management_proto_test.go` (+22 -22) 📝 `management/server/management_test.go` (+8 -2) 📝 `management/server/metrics/selfhosted.go` (+1 -2) 📝 `management/server/metrics/selfhosted_test.go` (+3 -4) 📝 `management/server/peer.go` (+2 -2) 📝 `management/server/peer_test.go` (+53 -6) 📝 `management/server/store/file_store.go` (+2 -2) 📝 `management/server/store/sql_store.go` (+10 -10) 📝 `management/server/store/sql_store_test.go` (+15 -15) 📝 `management/server/store/store.go` (+25 -32) _...and 5 more files_ </details> ### 📄 Description ## Describe your changes This PR fixes configuration inconsistencies and updates the store engine type usage throughout the management code. Key changes include: - Replacing outdated server.Config references with types.Config and updating related flag variables (e.g. types.MgmtConfigPath). - Converting engine constants (SqliteStoreEngine, PostgresStoreEngine, MysqlStoreEngine) to use types.Engine for consistent type–safety. - Adjusting various test and migration code paths to correctly reference the new configuration and engine types. ## Issue ticket number and link ### 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) - [ ] 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:07:47 -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#20857