From df32c051ec4420f079cf9e4a8bd96daec51751a9 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Wed, 19 Aug 2020 09:33:08 -0400 Subject: [PATCH 1/2] create-cluster: Ensure region is set when creating AWS client --- pkg/cluster/cluster.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index 271f5e33f2..ca72274343 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -97,6 +97,7 @@ func CreateCluster(client *cmv1.ClustersClient, config Spec) (*cmv1.Cluster, err // Create the AWS client: awsClient, err := aws.NewClient(). + Region(config.Region). Logger(logger). Build() if err != nil { From d6a172d6007d69532a50b47a57b6d982bf5bd8e0 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Wed, 19 Aug 2020 09:34:15 -0400 Subject: [PATCH 2/2] logs: Change how SDK logs are propagated Most SDK logs are irrelevant from the point of view of the end user, and so should be set behind the --debug flag. --- pkg/logging/ocm_logger.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/logging/ocm_logger.go b/pkg/logging/ocm_logger.go index 240fa8e503..b012b44910 100644 --- a/pkg/logging/ocm_logger.go +++ b/pkg/logging/ocm_logger.go @@ -93,11 +93,11 @@ func (l *OCMLogger) Debug(ctx context.Context, format string, args ...interface{ } func (l *OCMLogger) Info(ctx context.Context, format string, args ...interface{}) { - l.logger.Infof(format, args...) + l.logger.Debugf(format, args...) } func (l *OCMLogger) Warn(ctx context.Context, format string, args ...interface{}) { - l.logger.Warnf(format, args...) + l.logger.Debugf(format, args...) } func (l *OCMLogger) Error(ctx context.Context, format string, args ...interface{}) {