Skip to content

Commit

Permalink
provider: Development and testing updates for Go 1.16 upgrade, proper…
Browse files Browse the repository at this point in the history
… impi handling in tools Go module, and update [email protected] (hashicorp#17795)

Reference: hashicorp#17743
Reference: hashicorp#17685
Reference: https://golang.org/doc/go1.16

This change request bundles a few related items around the Go 1.16 upgrade and changes to the `tools` Go module:

* Removes `GO111MODULE=on` environment variable handling in GitHub Actions and GNUmakefile as that is now the default behavior in Go 1.16
* Adds missing `impi` into `tools/main.go` so it shows as needing to be versions
* Upgrades `golangci-lint` in `tools` since dependabot has been having trouble with this change for some reason
* Runs `go mod tidy` in `tools` with Go 1.16, which is the majority of the automatic updates in `tools/go.sum`

Now with Go 1.16, we can use `go install PACKAGE@VERSION` if we no longer want to use the `tools` Go module strategy, however that will also remove dependabot pinging us on tooling updates.
  • Loading branch information
bflad authored Feb 25, 2021
1 parent 8bd3e35 commit 9395e0d
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 155 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/acctest-terraform-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
- scripts/validate-terraform.sh
- tools/go.mod

env:
GO111MODULE: on

jobs:
terrafmt:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
- CHANGELOG.md
pull_request_target:

env:
GO111MODULE: on

jobs:
changes:
if: github.event_name == 'pull_request_target' && !contains(fromJSON('["anGie44", "bflad", "breathingdust", "gdavison", "maryelizbeth", "YakDriver"]'), github.actor)
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
- .go-version
- docs/**

env:
GO111MODULE: on

jobs:
markdown-link-check:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
- cron: '15 5 * * *'
workflow_dispatch:

env:
GO111MODULE: on

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/terraform_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ on:

env:
AWS_DEFAULT_REGION: us-west-2
GO111MODULE: on
TERRAFORM_VERSION: "0.12.25"

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ on:
- website/docs/**
- tools/go.mod

env:
GO111MODULE: on

jobs:
markdown-link-check:
runs-on: ubuntu-latest
Expand Down
16 changes: 8 additions & 8 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ importlint:
@impi --local . --scheme stdThirdPartyLocal ./$(PKG_NAME)/...

tools:
cd awsproviderlint && GO111MODULE=on go install .
cd tools && GO111MODULE=on go install github.com/bflad/tfproviderdocs
cd tools && GO111MODULE=on go install github.com/client9/misspell/cmd/misspell
cd tools && GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint
cd tools && GO111MODULE=on go install github.com/katbyte/terrafmt
cd tools && GO111MODULE=on go install github.com/terraform-linters/tflint
cd tools && GO111MODULE=on go install github.com/pavius/impi/cmd/impi
cd tools && GO111MODULE=on go install github.com/hashicorp/go-changelog/cmd/changelog-build
cd awsproviderlint && go install .
cd tools && go install github.com/bflad/tfproviderdocs
cd tools && go install github.com/client9/misspell/cmd/misspell
cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint
cd tools && go install github.com/katbyte/terrafmt
cd tools && go install github.com/terraform-linters/tflint
cd tools && go install github.com/pavius/impi/cmd/impi
cd tools && go install github.com/hashicorp/go-changelog/cmd/changelog-build

test-compile:
@if [ "$(TEST)" = "./..." ]; then \
Expand Down
4 changes: 2 additions & 2 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ go 1.15
require (
github.com/bflad/tfproviderdocs v0.8.0
github.com/client9/misspell v0.3.4
github.com/golangci/golangci-lint v1.35.2
github.com/golangci/golangci-lint v1.37.1
github.com/hashicorp/go-changelog v0.0.0-20201005170154-56335215ce3a
github.com/katbyte/terrafmt v0.3.0
github.com/pavius/impi v0.0.3 // indirect
github.com/pavius/impi v0.0.3
github.com/terraform-linters/tflint v0.24.1
)

Expand Down
190 changes: 61 additions & 129 deletions tools/go.sum

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tools/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ import (
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/hashicorp/go-changelog/cmd/changelog-build"
_ "github.com/katbyte/terrafmt"
_ "github.com/pavius/impi/cmd/impi"
_ "github.com/terraform-linters/tflint"
)

0 comments on commit 9395e0d

Please sign in to comment.