Skip to content

Conversation

@mlsmaycon
Copy link
Collaborator

@mlsmaycon mlsmaycon commented Mar 25, 2025

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

  • 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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

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.

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
management/server/grpcserver.go Updated config argument and protocol conversion to use types.Config.
management/server/types/config.go Switched package and added MgmtConfigPath variable for config file path.
management/cmd/root.go Revised flag registration to bind config flag to types.MgmtConfigPath.
management/server/store/*.go Converted engine constants and function signatures to use types.Engine.
management/server/peer.go Updated calls to toSyncResponse to use types.Config (with one inconsistent call).
management/cmd/management.go Replaced server.Config with types.Config in config loading and updating.
Various test files Adjusted type references in tests to use types.Config and types.Host.
management/server/token_mgr.go Updated TURN/Relay config references to use types.TURNConfig/Relay.

@mlsmaycon mlsmaycon changed the title [management] Fix/export mgmt config url [management] fix extend call and move config to types Mar 25, 2025
@sonarqubecloud
Copy link

@mlsmaycon mlsmaycon merged commit a4f04f5 into main Mar 27, 2025
38 checks passed
@mlsmaycon mlsmaycon deleted the fix/export-mgmt-config-url branch March 27, 2025 12:04
remipcomaite pushed a commit to remipcomaite/netbird that referenced this pull request Apr 9, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants