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

Update release process to include updating homebrew formula #1708

Merged

Conversation

kate-goldenring
Copy link
Contributor

Spin is now installable via brew! During releases, we should update the homebrew formula to point to the latest release artifacts.

ref #641

@kate-goldenring kate-goldenring changed the title Add line about updating brew package during releases Update release process to include updating homebrew formula Aug 24, 2023
Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we want to preserve formulas for previous Spin releases? eg when 1.5 comes out, we'd move the current spin.rb to spin.rb@1.4.1 and then update spin.rb with 1.5 values. Or, are we thinking just maintaining and updating the one formula? I assume with the former, users could brew install fermyon/tap/spin@1.4.1 whereas with the latter, no such version-pinning would be supported and users would always get the latest - is that correct?

In any case, this is more thinking ahead and isn't intended to block this PR. We can iterate, of course.

@kate-goldenring
Copy link
Contributor Author

kate-goldenring commented Aug 24, 2023

@vdice From my understanding, it is common practice to only support one Homebrew formula, namely the latest version of the project. If you want to support earlier versions ("pinned version formulas"), they become separate formula (like you mentioned) and you cannot simply brew upgrade to get the latest. For example, notice how Nomad's install instructions for macos only provide homebrew as an option for latest release; otherwise, you have to do a binary install: https://developer.hashicorp.com/nomad/docs/install.

in contrast, postgres releases each version as it's own pinned formula: https://www.postgresql.org/download/macosx/. Latest postgres is version 15; however if i install 14 and then brew upgrade, i stay on 14:

$ brew install postgresql@14
$ brew upgrade
$ brew list | grep postgresql
postgresql@14
$ brew install postgresql@15
$ brew list | grep postgresql
postgresql@14
postgresql@15

The only way to upgrade is to uninstall the old version and instal the new one (otherwise you get two installs) -- very unideal

My main concern here is that for some reason someone installs an older, pinned version and never moves up. But like you mention, we could take the hybrid approach and have latest always in spin.rb and then keep older versions as pinned. I'm happy with that. We should also have a retirement plan in that case -- aka we will only support the last X versions... but we probably arent there yet

@vdice
Copy link
Member

vdice commented Aug 24, 2023

@kate-goldenring thanks so much for filling out the gaps in my understanding. It's a bit more complex than I gathered at first. With this in mind, I'm totally in support of going with the one (latest) formula for now. We can revisit down the road, if we'd like. But, as you've pointed out, the overhead of managing different versions is non-trivial.

@kate-goldenring
Copy link
Contributor Author

@vdice I don't think it would be too hard to manage (just extra .rb files) -- i just feel there may be a reason that many other projects only support latest ... maybe to encourage that upgrade story? I do feel like we will hit this question actually in a week when we release 1.5

Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One non-blocking though, otherwise LGTM!

@@ -80,6 +80,11 @@ To cut a release of Spin, you will need to do the following:
`--certificate-identity` value should match this release, e.g.
`https://github.com/fermyon/spin/.github/workflows/release.yml@refs/tags/v1.1.0`.

1. Update the Spin [Homebrew
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention the specific mechanism envisioned for updating the formula? eg via PR or...?

@kate-goldenring
Copy link
Contributor Author

I'm swinging to think we should just also support pinned versions to start for now, but i also didn't figure out the conflicts statement in the formula so we could run into the issue of multiple installs.

@vdice
Copy link
Member

vdice commented Aug 24, 2023

@kate-goldenring ah, yea that would be good to figure out. We can always backfill with pinned formulas, if/when we want. Perhaps we track this potential effort in an issue in the homebrew-tap repo?

Signed-off-by: Kate Goldenring <kate.goldenring@fermyon.com>
@kate-goldenring kate-goldenring merged commit b38a9a8 into fermyon:main Aug 24, 2023
1 check passed
@kate-goldenring
Copy link
Contributor Author

@vdice issue to track on supporting other versions fermyon/homebrew-tap#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants