br icon indicating copy to clipboard operation
br copied to clipboard

Support the AWS_REGION env var

Open tirsen opened this issue 5 years ago • 3 comments

What problem does this PR solve?

Only override the region if it has been explicitly set, otherwise we clobber the standard AWS_REGION env var

https://github.com/pingcap/dumpling/pull/155#issuecomment-700136706

What is changed and how it works?

Support the standard AWS_REGION env var

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Release notes

  • Region no longer automatically defaults to us-east-1, it uses the AWS_REGION env var if specified

tirsen avatar Sep 29 '20 08:09 tirsen

Ah yes I removed the hard coded us-east-1 and updated the tests. This somewhat breaks backwards compatibility though but probably not in a bad way. Hardcoding us-east-1 could be disastrous.

tirsen avatar Sep 29 '20 12:09 tirsen

i think we need a

if len(aws.StringValue(ses.Config.Region)) == 0 {
    ses.Config.Region = aws.String("please supply --s3.region")
}

after line 250 to prevent that MissingRegion error thrown by the AWS SDK.

kennytm avatar Sep 29 '20 19:09 kennytm

@tirsen: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

ti-chi-bot avatar Mar 24 '21 16:03 ti-chi-bot