bored-sandwich-44626
03/14/2024, 7:49 PMupgrade-provider
and I'm getting this error
$ ~/go/bin/upgrade-provider emailbob/pulumi-twingate --upstream-provider-name terraform-provider-twingate --upstream-provider-org Twingate
--- Set Up Environment ---
- GOWORK=off
- PULUMI_MISSING_DOCS_ERROR=true
- PULUMI_EXTRA_MAPPING_ERROR=true
--- done ---
--- Discover Provider ---
...
- Upgrade Pulumi version in all places
- ✓ Get Pulumi SDK version: v3.108.1
- X /opt/homebrew/bin/go get <http://github.com/pulumi/pulumi/sdk/v3@v3.108.1|github.com/pulumi/pulumi/sdk/v3@v3.108.1>: exit status 1:
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install <http://example.com/cmd@latest|example.com/cmd@latest>'
For more information, see <https://golang.org/doc/go-get-install-deprecation>
or run 'go help get' or 'go help install'.
This happens when I run it from the root and provider directory. The is currently in a test repo.enough-garden-22763
03/14/2024, 7:59 PMenough-garden-22763
03/14/2024, 7:59 PMupgrade-provider
might be assuming that GO modules are used (go.mod
present)bored-sandwich-44626
03/14/2024, 8:27 PMupgrade-prover
make tfgen , provider, and build_sdks all workenough-garden-22763
03/14/2024, 8:29 PMbored-sandwich-44626
03/14/2024, 9:06 PMenough-garden-22763
03/14/2024, 9:47 PMenough-garden-22763
03/14/2024, 9:47 PM[1] t0yv0@Antons-MacBook-Pro> upgrade-provider emailbob/pulumi-twingate --upstream-provider-name terraform-provider-twingate --upstream-provider-org Twingate ~/code/pulumi-twingate
--- Set Up Environment ---
- GOWORK=off
- PULUMI_MISSING_DOCS_ERROR=true
- PULUMI_EXTRA_MAPPING_ERROR=true
--- done ---
--- Discover Provider ---
- Ensure Upstream Repo
- Expected Location: /Users/t0yv0/code/pulumi-twingate
- GetCwd: /Users/t0yv0/code/pulumi-twingate
- Repo Exists
- Stat
- Validate Repository
- git: /usr/bin/git status --short
- Pull Default Branch
- git: /usr/bin/git ls-remote --heads origin
- Find default Branch: main
- git: /usr/bin/git fetch
- git: /usr/bin/git checkout main
- git: /usr/bin/git pull origin
- Get Repo Kind
- /Users/t0yv0/code/pulumi-twingate/provider/go.mod: 12612 bytes read
- Stat
- Stat
- Plan Provider Upgrade: 1.2.1 -> 2.1.1
- Get Expected Target
- From Upstream Releases
- gh: /Users/t0yv0/bin/gh release list --repo=Twingate/terraform-provider-twingate --exclude-drafts --exclude-pre-releases
- Set Current Upstream From Plain
- Original Go Version of
- git: /usr/bin/git show main:provider/go.mod
--- done ---
--- Plan Upgrade ---
- Planning Bridge Upgrade: v3.69.0 -> v3.77.0
- git refs of
- git: /usr/bin/git ls-remote --tags <https://github.com/pulumi/pulumi-terraform-bridge.git>
- Planning Plugin SDK Upgrade: bridge v3.77.0 needs terraform-plugin-sdk v2.0.0-20240229143312-4f60ee4e2975
-> Check if we should release a maintenance patch
- gh: /Users/t0yv0/bin/gh repo view emailbob/pulumi-twingate --json=latestRelease
--- failed ---
error: parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
[1] t0yv0@Antons-MacBook-Pro> gh repo view emailbob/pulumi-twingate --json=latestRelease ~/code/pulumi-twingate
{
"latestRelease": null
}
enough-garden-22763
03/14/2024, 9:49 PMenough-garden-22763
03/14/2024, 9:49 PMenough-garden-22763
03/14/2024, 9:49 PM~/code/upgrade-provider/upgrade-provider emailbob/pulumi-twingate --upstream-provider-name terraform-provider-twingate --upstream-provider-org Twingate ~/code/pulumi-twingate
--- Set Up Environment ---
- GOWORK=off
- PULUMI_MISSING_DOCS_ERROR=true
- PULUMI_EXTRA_MAPPING_ERROR=true
--- done ---
--- Discover Provider ---
- Ensure Upstream Repo
- Expected Location: /Users/t0yv0/code/pulumi-twingate
- GetCwd: /Users/t0yv0/code/pulumi-twingate
- Repo Exists
- Stat
- Validate Repository
- git: /usr/bin/git status --short
- Pull Default Branch
- git: /usr/bin/git ls-remote --heads origin
- Find default Branch: main
- git: /usr/bin/git fetch
- git: /usr/bin/git checkout main
- git: /usr/bin/git pull origin
- Get Repo Kind
- /Users/t0yv0/code/pulumi-twingate/provider/go.mod: 12612 bytes read
- Stat
- Stat
- Plan Provider Upgrade: 1.2.1 -> 2.1.1
- Get Expected Target
- From Upstream Releases
- gh: /Users/t0yv0/bin/gh release list --repo=Twingate/terraform-provider-twingate --exclude-drafts --exclude-pre-releases
- Set Current Upstream From Plain
- Original Go Version of
- git: /usr/bin/git show main:provider/go.mod
--- done ---
--- Plan Upgrade ---
- Planning Bridge Upgrade: v3.69.0 -> v3.77.0
- git refs of
- git: /usr/bin/git ls-remote --tags <https://github.com/pulumi/pulumi-terraform-bridge.git>
- Planning Plugin SDK Upgrade: bridge v3.77.0 needs terraform-plugin-sdk v2.0.0-20240229143312-4f60ee4e2975
- Check if we should release a maintenance patch
- gh: /Users/t0yv0/bin/gh repo view emailbob/pulumi-twingate --json=latestRelease
--- done ---
--- Planning Java Gen Version Update ---
- Fetching latest Java Gen: 0.9.9
- Latest Release Version: of pulumi/pulumi-java: 0.9.9
- gh: /Users/t0yv0/bin/gh repo view pulumi/pulumi-java --json=latestRelease
- Stat
- Upgrading Java Gen Version: 0.0.0 -> 0.9.9
--- done ---
error: This is a major version update (v1 -> v2), but --major was not passed
enough-garden-22763
03/14/2024, 9:49 PMgit rev-parse HEAD ~/code/pulumi-twingate
6534f3dd065d39f17111d39f885a41c9c7e103d4
enough-garden-22763
03/14/2024, 9:49 PMbored-sandwich-44626
03/14/2024, 10:07 PM--target-version v1.2.1
bored-sandwich-44626
03/15/2024, 3:59 AMfind . -type f -name 'go.mod'
./provider/go.mod
./sdk/nodejs/node_modules/@pulumi/pulumi/tests/automation/data/testproj/go.mod
./sdk/go.mod
./examples/go.mod
After I run: ~/go/bin/upgrade-provider emailbob/pulumi-twingate --upstream-provider-name terraform-provider-twingate --upstream-provider-org Twingate --target-version v1.2.1
errors with:
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install <http://example.com/cmd@latest|example.com/cmd@latest>'
For more information, see <https://golang.org/doc/go-get-install-deprecation>
or run 'go help get' or 'go help install'.
./sdk/go.mod
is deleted
find . -type f -name 'go.mod'
./provider/go.mod
./sdk/nodejs/node_modules/@pulumi/pulumi/tests/automation/data/testproj/go.mod
./examples/go.mod
enough-garden-22763
03/15/2024, 5:22 PMenough-garden-22763
03/15/2024, 5:22 PM/Users/t0yv0/code/upgrade-provider/upgrade-provider emailbob/pulumi-twingate --upstream-provider-name terraform-provider-twingate --upstream-provider-org Twingate --target-version v1.2.1
```
enough-garden-22763
03/15/2024, 5:23 PM--- failed ---
error: exit status 1:
go: <http://github.com/emailbob/pulumi-twingate/sdk/go/twingate|github.com/emailbob/pulumi-twingate/sdk/go/twingate> imports
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi> imports
<http://github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin|github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin> tested by
<http://github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin.test|github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin.test> imports
<http://pgregory.net/rapid|pgregory.net/rapid> loaded from <http://pgregory.net/rapid@v0.5.5|pgregory.net/rapid@v0.5.5>,
but go 1.16 would select v0.6.1
go: <http://github.com/emailbob/pulumi-twingate/sdk/go/twingate|github.com/emailbob/pulumi-twingate/sdk/go/twingate> imports
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi> imports
<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil|github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil> imports
<http://github.com/uber/jaeger-client-go|github.com/uber/jaeger-client-go> imports
<http://github.com/uber/jaeger-client-go/utils|github.com/uber/jaeger-client-go/utils> tested by
<http://github.com/uber/jaeger-client-go/utils.test|github.com/uber/jaeger-client-go/utils.test> imports
<http://github.com/stretchr/testify/mock|github.com/stretchr/testify/mock> imports
<http://github.com/stretchr/objx|github.com/stretchr/objx> loaded from <http://github.com/stretchr/objx@v0.1.0|github.com/stretchr/objx@v0.1.0>,
but go 1.16 would select v0.5.0
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>
go: <http://github.com/emailbob/pulumi-twingate/sdk/go/twingate|github.com/emailbob/pulumi-twingate/sdk/go/twingate> imports
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi> imports
<http://github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin|github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin> tested by
<http://github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin.test|github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin.test> imports
<http://pgregory.net/rapid|pgregory.net/rapid> loaded from <http://pgregory.net/rapid@v0.5.5|pgregory.net/rapid@v0.5.5>,
but go 1.16 would select v0.6.1
go: <http://github.com/emailbob/pulumi-twingate/sdk/go/twingate|github.com/emailbob/pulumi-twingate/sdk/go/twingate> imports
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi> imports
<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil|github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil> imports
<http://github.com/uber/jaeger-client-go|github.com/uber/jaeger-client-go> imports
<http://github.com/uber/jaeger-client-go/utils|github.com/uber/jaeger-client-go/utils> tested by
<http://github.com/uber/jaeger-client-go/utils.test|github.com/uber/jaeger-client-go/utils.test> imports
<http://github.com/stretchr/testify/mock|github.com/stretchr/testify/mock> imports
<http://github.com/stretchr/objx|github.com/stretchr/objx> loaded from <http://github.com/stretchr/objx@v0.1.0|github.com/stretchr/objx@v0.1.0>,
but go 1.16 would select v0.5.0
enough-garden-22763
03/15/2024, 5:23 PMenough-garden-22763
03/15/2024, 5:23 PMgo version ~/code/pulumi-twingate
go version go1.21.5 darwin/amd64
enough-garden-22763
03/15/2024, 5:26 PM./sdk/nodejs/node_modules/@pulumi/pulumi/tests/automation/data/testproj/go.mod
instance is a bit unexpected, it's under node_modules so some testdata accidentally got published into p/p node SDK, which is not great, perhaps we have an unexpected interaction with that? Try cleaning git clean -fxd
before running upgrade-provider, that should remove node_modulesenough-garden-22763
03/15/2024, 5:42 PMsdk/go.mod
I ran into really annoying behavior where my edits are wiped out. Logged https://github.com/pulumi/upgrade-provider/issues/257 - this is definitely something very unhelpful.bored-sandwich-44626
03/15/2024, 6:25 PMupgrade-provider
for now?enough-garden-22763
03/15/2024, 6:35 PM