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

Allow providers to perform major version updates without ci-mgmt PRs #318

Closed
AaronFriel opened this issue Jan 27, 2023 · 7 comments
Closed
Assignees
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@AaronFriel
Copy link
Member

AaronFriel commented Jan 27, 2023

Updating a major version in a provider currently requires four or more pull requests, as shown with recent updates to Keycloak.

See:

Even major version updates should follow a normal release process for a software project: a code change followed by a release ceremony. For our providers, this would be a pull request and a @release-bot automation.

A pull request was made to Keycloak to demonstrate changes to ci-mgmt outputs that we'd have to make to support this:

If these changes were in place, three of the four pull requests would not have been needed to update Keycloak to v5.

@AaronFriel AaronFriel added the kind/enhancement Improvements or new features label Jan 27, 2023
@AaronFriel AaronFriel added this to the 0.84 milestone Jan 27, 2023
@AaronFriel AaronFriel modified the milestones: 0.84, 0.85 Feb 13, 2023
@t0yv0
Copy link
Member

t0yv0 commented Mar 9, 2023

The PR has been stalling a bit but I want to log some new findings/suggestions based on going through the TLS major version change.

One thing we should do is make the Makefile read VERSION_PREFIX from a file in the repository, to pass to pulumictl. Note that it's somehow a pain in Makefile to pass env vars to $(shell) sub-commands so that might need to be rewritten.. The requirement is that a maintainer that wants to initiate a new major version upgrade, edits the repo to indicate the new major version but does not edit the ci-mgmt controlled Makefile. Then this constraints version selection to start picking up new, say 5.x.x. versions. Which actually changes how sdk/go generated files look like.

@AaronFriel
Copy link
Member Author

With the Keycloak PR above, the major version was completely removed from the Makefile. That simplified things quite a lot. I'd need to look to see how the VERSION_PREFIX was calculated, but I think pulumictl will pick it up from the git tag on release builds.

@t0yv0
Copy link
Member

t0yv0 commented Mar 9, 2023

Also as regards to the PR in #319 - the idea to remove "/v5" completely from examples/ code is very clever, but costs making the examples a bit less copy-paste able. I'm on the fence there if the tradeoff's worth it. For an alt approach here's a quickie tool that does gofmt -r and go mod edit changes:

pulumi/upgrade-provider#9

It can also presumably scan README.md with regexes to update those, but maybe we should just edit out versioned references from the READMEs..

A version of this tool can be used as a read-only lint check to make sure the repo is consistent in terms of the major version, like the major version in the provider/ code is consistent with examples and sdk etc.

@t0yv0
Copy link
Member

t0yv0 commented Mar 9, 2023

Yeah Keycloak still doing VERSION := $(shell pulumictl get version) that's going to compute the old (say v4.x.x) version uses you already have the new (say 5.x.x) tag in history, which is a pain for the upgrade PRs.

@t0yv0
Copy link
Member

t0yv0 commented Mar 9, 2023

pulumi/pulumi-tls#190 runs tests on new version so there's no need to do the "disable/enable" test dance. I think that's really compelling.

@AaronFriel
Copy link
Member Author

AaronFriel commented Mar 9, 2023

We can decouple the Keycloak PR's makefile changes from the examples changes - we don't need to ship both together.

@mikhailshilkov mikhailshilkov modified the milestones: 0.85, 0.87 Apr 3, 2023
@mikhailshilkov mikhailshilkov removed this from the 0.87 milestone Apr 26, 2023
@iwahbe iwahbe added the resolution/fixed This issue was fixed label Oct 30, 2023
@iwahbe
Copy link
Member

iwahbe commented Oct 30, 2023

Fixed by moving the source of truth about a provider to the provider's repo: .ci-mgmt.yaml.

@iwahbe iwahbe closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants