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

Backport of Fix failing checks into v1.1 #29979

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #29977 to be assessed for backporting due to the inclusion of the label 1.1-backport.

The below text is copied from the body of the original PR.


Description

This PR fixes a few checks that unexpectedly started failing after a recent PR merge.

  1. staticcheck lint rule failure: x/crypto/openpgp is deprecated but there currently aren't good options to switch to

    Click to expand for lint failure output
       go generate ./...
       ==> Checking that code complies with static analysis requirements...
       internal/getproviders/package_authentication.go:12:2: package golang.org/x/crypto/openpgp is deprecated: this package is unmaintained except for security fixes. New applications should consider a more focused, modern alternative to OpenPGP for their specific task. If you are required to interoperate with OpenPGP systems and need a maintained package, consider a community fork. See https://golang.org/issue/44226.  (SA1019)
       internal/getproviders/package_authentication.go:13:2: package golang.org/x/crypto/openpgp/armor is deprecated: this package is unmaintained except for security fixes. New applications should consider a more focused, modern alternative to OpenPGP for their specific task. If you are required to interoperate with OpenPGP systems and need a maintained package, consider a community fork. See https://golang.org/issue/44226.  (SA1019)
       internal/getproviders/package_authentication.go:14:2: package golang.org/x/crypto/openpgp/errors is deprecated: this package is unmaintained except for security fixes. New applications should consider a more focused, modern alternative to OpenPGP for their specific task. If you are required to interoperate with OpenPGP systems and need a maintained package, consider a community fork. See https://golang.org/issue/44226.  (SA1019)
       internal/getproviders/package_authentication_test.go:12:2: package golang.org/x/crypto/openpgp is deprecated: this package is unmaintained except for security fixes. New applications should consider a more focused, modern alternative to OpenPGP for their specific task. If you are required to interoperate with OpenPGP systems and need a maintained package, consider a community fork. See https://golang.org/issue/44226.  (SA1019)
       exit status 1
       make: *** [Makefile:24: staticcheck] Error 1
    
  2. go.mod/go.sum issues: it looks like these files were updated from a very old commit, leading to some discrepancies. I've fixed the failure by running go mod tidy -go=1.16 && go mod tidy -go=1.17

    Click to expand for dependency error output
    github.com/hashicorp/terraform/internal/depsfile imports
    	github.com/google/go-cmp/cmp loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    github.com/hashicorp/terraform/internal/backend/remote-state/kubernetes imports
    	k8s.io/client-go/tools/clientcmd imports
    	github.com/imdario/mergo loaded from github.com/imdario/mergo@v0.3.11,
    	but go 1.16 would select v0.3.12
    github.com/hashicorp/terraform/internal/command tested by
    	github.com/hashicorp/terraform/internal/command.test imports
    	github.com/google/go-cmp/cmp/cmpopts loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    github.com/hashicorp/terraform/internal/depsfile imports
    	github.com/google/go-cmp/cmp imports
    	github.com/google/go-cmp/cmp/internal/diff loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    github.com/hashicorp/terraform/internal/depsfile imports
    	github.com/google/go-cmp/cmp imports
    	github.com/google/go-cmp/cmp/internal/flags loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    github.com/hashicorp/terraform/internal/depsfile imports
    	github.com/google/go-cmp/cmp imports
    	github.com/google/go-cmp/cmp/internal/function loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    github.com/hashicorp/terraform/internal/depsfile imports
    	github.com/google/go-cmp/cmp imports
    	github.com/google/go-cmp/cmp/internal/value loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    github.com/hashicorp/terraform/internal/addrs imports
    	github.com/hashicorp/hcl/v2/hclsyntax tested by
    	github.com/hashicorp/hcl/v2/hclsyntax.test imports
     	github.com/kr/pretty loaded from github.com/kr/pretty@v0.2.0,
    	but go 1.16 would select v0.2.1
    github.com/hashicorp/terraform/internal/backend/remote-state/oss imports
    	github.com/aliyun/aliyun-oss-go-sdk/oss tested by
    	github.com/aliyun/aliyun-oss-go-sdk/oss.test imports
    	gopkg.in/check.v1 loaded from gopkg.in/check.v1@v1.0.0-20200227125254-8fa46927fb4f,
    	but go 1.16 would select v1.0.0-20201130134442-10cb98267c6c
    github.com/hashicorp/terraform/internal/cloud imports
    	github.com/hashicorp/hcl/v2/hclwrite tested by
    	github.com/hashicorp/hcl/v2/hclwrite.test imports
    	github.com/sergi/go-diff/diffmatchpatch loaded from github.com/sergi/go-diff@v1.0.0,
    	but go 1.16 would select v1.2.0
    github.com/hashicorp/terraform/internal/depsfile imports
    	github.com/google/go-cmp/cmp tested by
    	github.com/google/go-cmp/cmp.test imports
    	github.com/google/go-cmp/cmp/internal/testprotos loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    github.com/hashicorp/terraform/internal/depsfile imports
    	github.com/google/go-cmp/cmp tested by
    	github.com/google/go-cmp/cmp.test imports
    	github.com/google/go-cmp/cmp/internal/teststructs loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    github.com/hashicorp/terraform/internal/depsfile imports
    	github.com/google/go-cmp/cmp tested by
    	github.com/google/go-cmp/cmp.test imports
    	github.com/google/go-cmp/cmp/internal/teststructs/foo1 loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    github.com/hashicorp/terraform/internal/depsfile imports
    	github.com/google/go-cmp/cmp tested by
    	github.com/google/go-cmp/cmp.test imports
    	github.com/google/go-cmp/cmp/internal/teststructs/foo2 loaded from github.com/google/go-cmp@v0.5.5,
    	but go 1.16 would select v0.5.6
    
    To upgrade to the versions selected by go 1.16:
    	go mod tidy -go=1.16 && go mod tidy -go=1.17
    If reproducibility with go 1.16 is not needed:
    	go mod tidy -compat=1.17
    For other options, see:
    	https://golang.org/doc/modules/pruning
    

I'm seeing these failures on the main branch and the v1.1 branch, so this will need to be backported I believe.

@teamterraform teamterraform force-pushed the backport/lafentres/staticcheck-lint-whitelist-openpgp/blindly-super-treefrog branch from 6972493 to e4a6a4e Compare November 18, 2021 21:15
@lafentres lafentres added dependencies Auto-pinning security Auto-pinning labels Nov 18, 2021
@lafentres lafentres merged commit 592853b into v1.1 Nov 18, 2021
@lafentres lafentres deleted the backport/lafentres/staticcheck-lint-whitelist-openpgp/blindly-super-treefrog branch November 18, 2021 21:28
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Auto-pinning security Auto-pinning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants