Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Support the AWS_REGION env var #542

Closed
wants to merge 3 commits into from

Conversation

tirsen
Copy link
Contributor

@tirsen tirsen commented Sep 29, 2020

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

pingcap/dumpling#155 (comment)

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

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

@kennytm kennytm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a test case to s3_test.go (extending TestApplyUpdate should be good)

rest LGTM

@tirsen tirsen force-pushed the jontirsen/2020-09-29/fix-region branch from 7f99a12 to c0be5fc Compare September 29, 2020 12:46
@tirsen
Copy link
Contributor Author

tirsen commented Sep 29, 2020

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.

@kennytm
Copy link
Collaborator

kennytm commented Sep 29, 2020

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.

@ti-chi-bot
Copy link
Member

@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.

@tirsen tirsen closed this Sep 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants