Hi, for the first time I’m upgrading a provider to...
# package-authoring
t
Hi, for the first time I’m upgrading a provider to a major version so i discovred the --major flag/parameter 😉 And I just saw a problem: the suggested link is broken: 404 not found
l
This points to a private repo. @enough-garden-22763, @ancient-policeman-24615 or @adorable-house-61348, can one of you help @thankful-match-46035?
a
Perhaps one of these steps is needed:
Copy code
1. Compile the code:

    ```bash
    VERSION_PREFIX=2.0.0 make tfgen
VERSION_PREFIX
instructs
pulumictl
tool to compute 2.x.x versions before any tags are applied, which is important because the generated Go code under sdk/go is sensitive to the major version. 1. Build the SDKs for the new version:
Copy code
bash
    VERSION_PREFIX=2.0.0 make build_sdks
1. In
sdk/go.mod
, update the
module
directive to the new version 1. Download the updated dependencies for the SDK:
Copy code
bash
    cd sdk && go mod tidy
1. In
README.md
, update all instructions to reference the new version of the provider, including updating the version of the Go SDK. 1. Now
git commit
the changes and tag them with
git tag v2.0.0-alpha.0
. Note that the tag will make sure that
pulumictl
computes the right version both locally and in CI, and making it
-alpha
makes sure the changes do not go out as a production release before they are ready. 1. Create a PR for the provider upgrade. Also, push the new tag so the remote is aware of it:
git push origin v2.0.0-alpha.0
. You may need to iterate to update examples for any breaking changes. When merging the PR, make sure to use "Create a merge commit" method (and not Rebase or Squash) so that after merging to the main branch the tag continues pointing to a valid commit on the main branch.``` can you link your PR here and we can take a look?
g
Hello everyone, Using
--major
has been quite a headache, and it's broken our CI to have it be necessary to include it. I haven't quite figured out what it's doing differently beside a normal upgrade, but I do know I haven't gotten it to be successful yet. So it's buggy at best. Would anyone be able to help me with this? For context; working on https://github.com/equinix/pulumi-equinix which is build from https://github.com/equinix/terraform-provider-equinix terraform-equinix-provider was recently upgraded to major version v3.0.0 because of tfpluginprotocol updates. For now, I don't see why this would cause Pulumi to need a major upgrade right at the same moment. Wouldn't it be better to have flexibility and give the developer the freedom to make the call? Blocking an upgrade because
--major
isn't passed but also having bugs in the code related to that flag has been less than ideal an experience
It's causing issues with go versions as well, even after using
export VERSION_PREFIX=3.0.0
Copy code
go.mod:7:2: require <http://github.com/equinix/pulumi-equinix/sdk/v3|github.com/equinix/pulumi-equinix/sdk/v3>: version "v3.0.0-alpha.1731439925+5c499eab.dirty" invalid: unknown revision sdk/v3.0.0-alpha.1731439925+5c499eab.dirty
error: installing dependencies failed: `go mod tidy` failed to install dependencies: exit status 1
it doesn't create a
equinix/pulumi-equinix/sdk/v3
package that can be imported/installed
a
Hey @gorgeous-tent-39183, sorry you've hit that. Do you have a branch we can look at? Did you update the go module directives to point to the new version?
g
I've deviated from the
upgrade-provider
on my branch because I wasn't able to get it past the step where it's looking for a version of the pulumi sdk in go.mod that didn't exist.
I'll get another branch up that gets you to the point where upgrade-provider is stuck with the above message and send that over
Here's the PR that was created and you can see the command that was used to generate it: https://github.com/equinix/pulumi-equinix/pull/238 If you pull down that branch and run the same command it still gives the same error:
Copy code
Major Version Updates are not fully automated!
You need to complete Step 11: Updating README.md and sdk/python/README.md in a follow up commit.
Steps are listed at
	<https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-major-version-update.md>
I don't know what was different this time, but the first time I ran the command it never got to a point where it generated the PR. There were lots of issues along the way. The only change I know of is that I committed the
upstream
submodule and the
provider/resources.go
mappings manually before running the upgrade-provider command. What is the update in the README.md hoping to be?
a
Glad you managed to work around the problem. I think the message is referring to the steps here: https://pulumi-community.slack.com/archives/C04NPQTRKM4/p1730300162899349?thread_ts=1730299183.792109&amp;cid=C04NPQTRKM4