Conversation
rework how the config file is passed in perform merges from config.specific sections to the global config +semver: feature +semver: FEATURE
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to specify global and specific parameters through a config INI file, enhancing the configuration management system.
Key changes include:
- Introduces configuration file parsing with global
[config]sections and specific[config.specific_section]sections - Adds support for merging configuration from files with command-line flags
- Refactors method signatures to pass configuration data explicitly rather than loading it internally
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/web/web.go | Adds method to set custom browser executable path |
| internal/credentialexchange/secret.go | Refactors ClearAll method to accept INI file parameter and moves method positioning |
| internal/credentialexchange/helper.go | Adds LoadCliConfig function for merging global and specific configuration sections |
| internal/credentialexchange/config.go | Adds INI tags to struct fields for configuration mapping |
| cmd/saml.go | Major refactoring to support configuration file loading and flag merging |
| cmd/awscliauth.go | Updates root command flags structure and adds config file location parameter |
| cmd/clear.go | Updates to use new ClearAll method signature |
Comments suppressed due to low confidence (1)
internal/credentialexchange/helper_test.go:1
- All t.Error() calls should include descriptive error messages explaining what was expected vs actual values to aid in debugging test failures.
package credentialexchange_test
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| for name, tt := range ttests { | ||
| t.Run(name, func(t *testing.T) { | ||
| tmpDir, _ := os.MkdirTemp(os.TempDir(), "saml-cred-test") | ||
| tmpDir, _ := os.MkdirTemp(os.TempDir(), "saml-cred-test-*") |
There was a problem hiding this comment.
Error from os.MkdirTemp should be checked and handled. The underscore assignment ignores potential errors that could cause test failures.
Suggested change
| tmpDir, _ := os.MkdirTemp(os.TempDir(), "saml-cred-test-*") | |
| tmpDir, err := os.MkdirTemp(os.TempDir(), "saml-cred-test-*") | |
| if err != nil { | |
| t.Fatal(err) | |
| } |
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



name:
Describe the PR
added more sections to the config file
fix: add more tests
rework how the config file is passed in
perform merges from config.specific sections to the global config
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
+semver: feature
+semver: FEATURE