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

Upgrade go compiler 1.13.4 -> 1.14.3 #6359

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function tpgpatch1 {
git checkout $pr_username/$feature_branch
git format-patch $(git merge-base HEAD master)
}

function tpgpatch2 {
for patch in $GOPATH/src/github.com/terraform-providers/terraform-provider-google*/*.patch; do
echo "checking ${patch}"
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.4
1.14.3
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
- docker
language: go
go:
- "1.13.x"
- "1.14.x"

install:
# This script is used by the Travis build to install a cookie for
Expand Down
5 changes: 1 addition & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ TEST?=$$(go list ./...)
WEBSITE_REPO=github.com/hashicorp/terraform-website
PKG_NAME=google

GO111MODULE=on
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm so sorry. As I'm making these changes in beta, I saw this and I wonder if it does any harm leaving this in? I'm thinking in case the current environment already has it set, it might be nice to have this here to override it specifically for this makefile. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I don't think there are too many people who have GO111MODULE=off in their shell configs. That would break too many things. The only time I've seen in set to off is when you're want the old go get behavior, e.g.

GO111MODULE=off go get github.com/foo/bar/cmd/baz

I could be wrong, though.

My preference is to embrace the new default behavior, and let people disable it inline (like the snippet above), but I'll leave it up to you.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok! We'll try it and if we get any feedback we can always add it back in. That sounds find to me! Thanks!


default: build

build: fmtcheck generate
go install

test: fmtcheck generate
go test $(TESTARGS) -timeout=30s -parallel=4 $(TEST)
go test $(TESTARGS) -timeout=30s $(TEST)
Copy link
Contributor Author

@ryboe ryboe May 12, 2020

Choose a reason for hiding this comment

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

There's no need to pipe the list of packages to xargs. I was told parallelism was being limited to 4 for CI reasons, but I'm skeptical of that. Unless you have some very weird CI situation, limiting parallelism just slows down your tests a little. If a higher parallelism causes test failures, then you've got race conditions in your tests and they should be fixed or parallelism should be set to 1.


testacc: fmtcheck generate
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test $(TEST) -v $(TESTARGS) -timeout 240m -ldflags="-X=github.com/terraform-providers/terraform-provider-google/version.ProviderVersion=acc"
Expand Down Expand Up @@ -63,4 +61,3 @@ docscheck:
@sh -c "'$(CURDIR)/scripts/docscheck.sh'"

.PHONY: build test testacc vet fmt fmtcheck lint tools errcheck test-compile website website-test docscheck generate

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ for more details on how to use `google-beta`.
Upgrading the provider
----------------------

The Google provider doesn't upgrade automatically once you've started using it. After a new release you can run
The Google provider doesn't upgrade automatically once you've started using it. After a new release you can run

```bash
terraform init -upgrade
Expand Down Expand Up @@ -63,7 +63,7 @@ Developing the provider
---------------------------

If you wish to work on the provider, you'll first need [Go](http://www.golang.org)
installed on your machine (version 1.13.0+ is *required*). You can use [goenv](https://github.com/syndbg/goenv)
installed on your machine (version 1.14.0+ is *required*). You can use [goenv](https://github.com/syndbg/goenv)
to manage your Go version. You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH),
as well as adding `$GOPATH/bin` to your `$PATH`.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ require (
google.golang.org/api v0.23.0
)

go 1.13
go 1.14
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line doesn't prevent recent Go 1.13 compilers from building the plugin. It just says "use the latest modules behavior." Keeping this up-to-date can prevent some dependency headaches.