-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-2309] fix: config set command (#2372)
This pull request introduces several changes to the `cli/cmd/config.go` file to enhance configuration management in Odigos. The changes include importing new packages, updating command arguments, and modifying the configuration update process. ### Imports and Dependencies: * Added imports for `resources`, `odigospro`, `common`, and `consts` packages to support new functionalities. ### Command Argument Handling: * Changed the `Args` for the `setConfigCmd` command from `cobra.ExactArgs(2)` to `cobra.MinimumNArgs(2)` to allow for multiple values. ### Configuration Update Process: * Replaced the `updateConfigProperty` function with `setConfigProperty` to handle a broader range of configuration properties and to increment the `ConfigVersion`. * Introduced a new process to fetch the current configuration and apply changes using `resources.GetCurrentConfig`, `resources.CreateResourceManagers`, and `resources.ApplyResourceManagers`. * Added error handling for deprecated configurations and cleanup of old Odigos resources. These changes improve the flexibility and robustness of the configuration management in Odigos. --------- Co-authored-by: alonkeyval <[email protected]>
- Loading branch information
1 parent
38bdcec
commit 6628afe
Showing
2 changed files
with
99 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters