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

provider: Update default development and testing to Go 1.13 #10206

Merged
merged 1 commit into from
Sep 23, 2019
Merged

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Sep 23, 2019

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #9992
Closes #10054

Release note for CHANGELOG:

NOTES

* provider: The default development, testing, and building of the Terraform AWS Provider binary is now done with Go 1.13. This version of Go now requires macOS 10.11 El Capitan or later and FreeBSD 11.2 or later. Support for previous versions of those operating systems has been discontinued.

The main change here (and impetus because it seems to use too much memory in Go 1.12 for TravisCI to successfully pass linting) is upgrading github.com/golangci/golangci-lint to v1.18.0, which has fixes for Go 1.13 support in its listed dependencies. It was upgraded via:

$ go get github.com/golangci/golangci-lint@v1.18.0
$ go mod tidy
$ go mod vendor

The addition of go 1.13 to the go.mod file signals that this module should be built with that version of Go or later. Different than Go 1.12, any Go 1.13 command run against the module will always add that versioning information to the go.mod file. We add this once now to prevent unnecessary Git differences in the future. Development, testing, and building with Go 1.12 and earlier should not be affected as we are not introducing any breaking changes at the moment, but we do not officially support versions other than what is tested against via TravisCI.

As a simple verification of the above statement:

$ go1.12 version
go version go1.12.9 darwin/amd64
$ go1.12 test ./...
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1.313s
$ go1.12 build
$

Passes unit testing, linting, smoke acceptance testing, and release process cross-compilation testing.

$ TF_ACC=1 go test ./aws -v -timeout 120m -parallel 20 -run='TestAccAWSProvider'
...
--- PASS: TestAccAWSProvider_Region_AwsCommercial (2.58s)
--- PASS: TestAccAWSProvider_Region_AwsGovCloudUs (2.59s)
--- PASS: TestAccAWSProvider_Region_AwsChina (2.60s)
--- PASS: TestAccAWSProvider_Endpoints_Deprecated (2.72s)
--- PASS: TestAccAWSProvider_Endpoints (2.80s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	3.846s
$ gox -os='linux darwin windows freebsd openbsd solaris' -arch='386 amd64 arm' -osarch='!darwin/arm !darwin/386' -ldflags '-s -w -X aws/version.ProviderVersion=99.99.99 -X aws/version.ProtocolVersion=4' -output 'results/{{.OS}}_{{.Arch}}/terraform-provider-aws_v99.99.99_x4' .
Number of parallel builds: 7

-->    darwin/amd64: github.com/terraform-providers/terraform-provider-aws
-->     linux/amd64: github.com/terraform-providers/terraform-provider-aws
-->   solaris/amd64: github.com/terraform-providers/terraform-provider-aws
-->       linux/arm: github.com/terraform-providers/terraform-provider-aws
-->   windows/amd64: github.com/terraform-providers/terraform-provider-aws
-->     freebsd/386: github.com/terraform-providers/terraform-provider-aws
-->     windows/386: github.com/terraform-providers/terraform-provider-aws
-->   freebsd/amd64: github.com/terraform-providers/terraform-provider-aws
-->     freebsd/arm: github.com/terraform-providers/terraform-provider-aws
-->     openbsd/386: github.com/terraform-providers/terraform-provider-aws
-->   openbsd/amd64: github.com/terraform-providers/terraform-provider-aws
-->       linux/386: github.com/terraform-providers/terraform-provider-aws

@bflad bflad added dependencies Used to indicate dependency changes. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. provider Pertains to the provider itself, rather than any interaction with AWS. labels Sep 23, 2019
@bflad bflad requested review from a team September 23, 2019 17:01
@ghost ghost added the size/XXL Managed by automation to categorize the size of a PR. label Sep 23, 2019
Reference: #9992
Reference: #10054

The main change here (and impetus because it seems to use too much memory in Go 1.12 for TravisCI to successfully pass linting) is upgrading github.com/golangci/golangci-lint to v1.18.0, which has fixes for Go 1.13 support in its listed dependencies. It was upgraded via:

```console
$ go get github.com/golangci/golangci-lint@v1.18.0
$ go mod tidy
$ go mod vendor
```

The addition of `go 1.13` to the `go.mod` file signals that this module should be built with that version of Go or later. Different than Go 1.12, any Go 1.13 command run against the module will always add that versioning information to the go.mod file. We add this once now to prevent unnecessary Git differences in the future. Development, testing, and building with Go 1.12 and earlier should not be affected as we are not introducing any breaking changes at the moment, but we do not officially support versions other than what is tested against via TravisCI.

As a simple verification of the above statement:

```console
$ go1.12 version
go version go1.12.9 darwin/amd64
$ go1.12 test ./...
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1.313s
$ go1.12 build
$
```

Passes unit testing, linting, smoke acceptance testing, and release process cross-compilation testing.

```console
$ TF_ACC=1 go test ./aws -v -timeout 120m -parallel 20 -run='TestAccAWSProvider'
...
--- PASS: TestAccAWSProvider_Region_AwsCommercial (2.58s)
--- PASS: TestAccAWSProvider_Region_AwsGovCloudUs (2.59s)
--- PASS: TestAccAWSProvider_Region_AwsChina (2.60s)
--- PASS: TestAccAWSProvider_Endpoints_Deprecated (2.72s)
--- PASS: TestAccAWSProvider_Endpoints (2.80s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	3.846s
$ gox -os='linux darwin windows freebsd openbsd solaris' -arch='386 amd64 arm' -osarch='!darwin/arm !darwin/386' -ldflags '-s -w -X aws/version.ProviderVersion=99.99.99 -X aws/version.ProtocolVersion=4' -output 'results/{{.OS}}_{{.Arch}}/terraform-provider-aws_v99.99.99_x4' .
Number of parallel builds: 7

-->    darwin/amd64: github.com/terraform-providers/terraform-provider-aws
-->     linux/amd64: github.com/terraform-providers/terraform-provider-aws
-->   solaris/amd64: github.com/terraform-providers/terraform-provider-aws
-->       linux/arm: github.com/terraform-providers/terraform-provider-aws
-->   windows/amd64: github.com/terraform-providers/terraform-provider-aws
-->     freebsd/386: github.com/terraform-providers/terraform-provider-aws
-->     windows/386: github.com/terraform-providers/terraform-provider-aws
-->   freebsd/amd64: github.com/terraform-providers/terraform-provider-aws
-->     freebsd/arm: github.com/terraform-providers/terraform-provider-aws
-->     openbsd/386: github.com/terraform-providers/terraform-provider-aws
-->   openbsd/amd64: github.com/terraform-providers/terraform-provider-aws
-->       linux/386: github.com/terraform-providers/terraform-provider-aws
```
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM 👍 👍

@bflad bflad added this to the v2.30.0 milestone Sep 23, 2019
@bflad bflad merged commit 4d4118b into master Sep 23, 2019
@bflad bflad deleted the f-go-1.13 branch September 23, 2019 21:01
bflad added a commit that referenced this pull request Sep 23, 2019
@ghost
Copy link

ghost commented Sep 26, 2019

This has been released in version 2.30.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 1, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Used to indicate dependency changes. provider Pertains to the provider itself, rather than any interaction with AWS. size/XXL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Development Information and Test Configurations for Go 1.13
2 participants