zeroshade commented on code in PR #1320:
URL: https://github.com/apache/iceberg-go/pull/1320#discussion_r3482957310


##########
cmd/iceberg/main.go:
##########
@@ -810,6 +816,10 @@ func mergeConf(fileConf *config.CatalogConfig, args *Args, 
explicitFlags map[str
                args.Warehouse = fileConf.Warehouse
        }
 
+       if !explicitFlags["aws-profile"] && len(fileConf.AwsProfile) > 0 {

Review Comment:
   nit: this `mergeConf` branch and the `--aws-profile` flag itself aren't 
covered by `args_test.go`. A case asserting (a) `--aws-profile` parses onto 
`Args`, and (b) the file-config value is applied only when the flag is absent, 
would lock in the precedence.



##########
config/config.go:
##########
@@ -47,6 +47,7 @@ type CatalogConfig struct {
        Output      string       `yaml:"output"`
        Credential  string       `yaml:"credential"`
        Warehouse   string       `yaml:"warehouse"`
+       AwsProfile  string       `yaml:"aws-profile,omitempty"`

Review Comment:
   nit: `AwsProfile` carries `omitempty` while the sibling string fields 
(`Output`, `Credential`, `Warehouse`) don't. Harmless on unmarshal, but worth 
making consistent one way or the other.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to