Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend/s3: Update aws-sdk-go-base to v0.6.0 #25903

Merged
merged 1 commit into from
Aug 18, 2020
Merged

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Aug 18, 2020

Reference: hashicorp/terraform-provider-aws#9149

Changes:

backend/s3: support for appending data to the User-Agent request header with the TF_APPEND_USER_AGENT environment variable
backend/s3: simplified mock handling and assume role testing 

Dependency updated via:

$ go get github.com/hashicorp/aws-sdk-go-base@v0.6.0
$ go mod tidy
$ go mod vendor

Output of backend-related tests:

ok  	github.com/hashicorp/terraform/backend	0.570s
ok  	github.com/hashicorp/terraform/backend/atlas	2.491s
ok  	github.com/hashicorp/terraform/backend/init	2.306s
ok  	github.com/hashicorp/terraform/backend/local	2.257s
ok  	github.com/hashicorp/terraform/backend/remote	80.824s
ok  	github.com/hashicorp/terraform/backend/remote-state/artifactory	1.312s
ok  	github.com/hashicorp/terraform/backend/remote-state/azure	1.928s
ok  	github.com/hashicorp/terraform/backend/remote-state/consul	0.742s
ok  	github.com/hashicorp/terraform/backend/remote-state/cos	1.093s
ok  	github.com/hashicorp/terraform/backend/remote-state/etcdv2	2.675s
ok  	github.com/hashicorp/terraform/backend/remote-state/etcdv3	2.297s
ok  	github.com/hashicorp/terraform/backend/remote-state/gcs	1.720s
ok  	github.com/hashicorp/terraform/backend/remote-state/http	6.163s
ok  	github.com/hashicorp/terraform/backend/remote-state/inmem	2.464s
ok  	github.com/hashicorp/terraform/backend/remote-state/kubernetes	2.447s
ok  	github.com/hashicorp/terraform/backend/remote-state/manta	2.905s
ok  	github.com/hashicorp/terraform/backend/remote-state/oss	1.949s
ok  	github.com/hashicorp/terraform/backend/remote-state/pg	1.935s
ok  	github.com/hashicorp/terraform/backend/remote-state/s3	2.054s
ok  	github.com/hashicorp/terraform/backend/remote-state/swift	2.187s

@codecov
Copy link

codecov bot commented Aug 18, 2020

Codecov Report

Merging #25903 into master will not change coverage.
The diff coverage is n/a.

@anGie44 anGie44 changed the title backend/s3: Update aws-sdk-go-based to v0.6.0 backend/s3: Update aws-sdk-go-base to v0.6.0 Aug 18, 2020
@anGie44 anGie44 requested a review from bflad August 18, 2020 15:24
@bflad bflad self-assigned this Aug 18, 2020
@bflad
Copy link
Contributor

bflad commented Aug 18, 2020

For this change:

backend/s3: adding support for appending data to user-agent request headers via env var

Let's modify that description (which will be copied into the CHANGELOG) to mention TF_APPEND_USER_AGENT so practitioners do not need to look it up in the source code. We should also add documentation to website/docs/backends/types/s3.html.md similar to hashicorp/terraform-provider-aws#14555, although we may want to include that it only applies to Terraform 0.13.1 and later. 👍

backend/s3: simplified mock handling and assume role testing

We should migrate the constants and variables at the top of backend/remote-state/s3/backend_test.go to their new upstream counterparts if we want to include this change, otherwise its not yet applicable. 😄

@anGie44
Copy link
Contributor Author

anGie44 commented Aug 18, 2020

ready for re-review!

verified backend tests w/const changes:

ok  	github.com/hashicorp/terraform/backend	0.847s
ok  	github.com/hashicorp/terraform/backend/atlas	2.674s
ok  	github.com/hashicorp/terraform/backend/init	2.574s
ok  	github.com/hashicorp/terraform/backend/local	3.276s
ok  	github.com/hashicorp/terraform/backend/remote	81.421s
ok  	github.com/hashicorp/terraform/backend/remote-state/artifactory	0.947s
ok  	github.com/hashicorp/terraform/backend/remote-state/azure	1.713s
ok  	github.com/hashicorp/terraform/backend/remote-state/consul	1.162s
ok  	github.com/hashicorp/terraform/backend/remote-state/cos	2.129s
ok  	github.com/hashicorp/terraform/backend/remote-state/etcdv2	3.307s
ok  	github.com/hashicorp/terraform/backend/remote-state/etcdv3	3.069s
ok  	github.com/hashicorp/terraform/backend/remote-state/gcs	2.564s
ok  	github.com/hashicorp/terraform/backend/remote-state/http	5.462s
ok  	github.com/hashicorp/terraform/backend/remote-state/inmem	2.368s
ok  	github.com/hashicorp/terraform/backend/remote-state/kubernetes	2.376s
ok  	github.com/hashicorp/terraform/backend/remote-state/manta	1.938s
ok  	github.com/hashicorp/terraform/backend/remote-state/oss	2.044s
ok  	github.com/hashicorp/terraform/backend/remote-state/pg	2.186s
ok  	github.com/hashicorp/terraform/backend/remote-state/s3	2.261s
ok  	github.com/hashicorp/terraform/backend/remote-state/swift	1.870s

Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Awesome! Looks great 🚀

Output from acceptance testing:

$ TF_ACC=1 go test ./backend/remote-state/s3 -v -count=1
...
--- PASS: TestRemoteClient_stateChecksum (19.39s)
PASS
ok  	github.com/hashicorp/terraform/backend/remote-state/s3	200.704s

@anGie44 anGie44 merged commit d96d834 into master Aug 18, 2020
@anGie44 anGie44 deleted the f-aws-sdk-go-base-update branch August 18, 2020 18:09
@bflad bflad added this to the v0.13.1 milestone Aug 18, 2020
anGie44 added a commit that referenced this pull request Aug 18, 2020
@ghost
Copy link

ghost commented Oct 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 10, 2020
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.

2 participants