Skip to content

[Bug]: Brew don't install the latest official release: 0.9.0 #506

@cmoulliard

Description

@cmoulliard

What is your environment, configuration, and command?

OS: macOS: 14.7.4-arm64
Tool: 
/opt/homebrew/bin/brew config
HOMEBREW_VERSION: 4.4.24-201-g2462e40
ORIGIN: https://github.com/Homebrew/brew

What did you do and What did you see instead?

The users don't get the latest official release of idpbuilder when they install or upgrade our formula.

Example

❯ idp version
idpbuilder 0.9.0-nightly.20250212 go1.22.12 darwin/arm64

❯ brew upgrade idpbuilder
==> Upgrading 1 outdated package:
cnoe-io/tap/idpbuilder 0.9.0-nightly.20250212 -> 0.10.0-nightly.20250226
==> Fetching cnoe-io/tap/idpbuilder
==> Downloading https://github.com/cnoe-io/idpbuilder/releases/download/v0.10.0-nightly.20250226/idpbuilder-darwin-arm64.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/697890131/44965a14-b2ef-4379-a3b7-f861ad43c97e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-A
############################################################################################################################################################################## 100.0%
==> Upgrading cnoe-io/tap/idpbuilder
  0.9.0-nightly.20250212 -> 0.10.0-nightly.20250226

The latest official release is now 0.9.0 but brew installs the nightly build 0.10.0-nightly.xxxxxxx as that corresponds to the latest formula published having as version: https://github.com/cnoe-io/homebrew-tap/blob/main/Formula/idpbuilder.rb#L8

Solutions

A possible workaround could be to use the gorelease alternatives_names field: https://goreleaser.com/customization/homebrew/#versioned-formulas BUT this option is only available using gorelease PRO !!

I'm not even sure that gorelease could help us here as the formula file name must be created using a specific convention - https://docs.brew.sh/Versions to support different versions.

See dapr project as example: https://github.com/dapr/homebrew-tap

In this case, scripts should be used to populate the formula file in a normal releasing flow: https://github.com/dapr/homebrew-tap/blob/master/.github/workflows/release.yml

Here is another way to achieve that: https://github.com/knative/homebrew-client/blob/main/.github/workflows/knative-update-release.yaml#L21

Discussion

Independently of this issue that we should address, it is also important to figure out how users will consume the formula versions.

Personally, I think that we should do this:

  • The idpbuilder.rb file should always include the tarball urls of the latest idpbuilder version released which is currently: 0.9.0
  • When a new release is out, then we generate a new idpbuilder.rb file and create an old file packaging the previous release. Example, if we release 0.10.0, then we will generate a file [email protected] where the classname is equal to idpbuilderAT090, version: 0.9.0 etc with urls of that release AND idpbuilder.rb will include the version 0.10.0 and urls of the corresponding tarballs
  • What about the nightly builds (aka release candidates). When a new RC (or nightly build is generated) on github, then a a corresponding formula file should be created [email protected] and classname: idpbuilderAT0100nightly20250317 and pushed.
    Remark: The users will not be able to install them directly (as brew installs by default what idpbuilder.rb contains) except if they update their homebrew/tap repo locally and use the command: brew install [email protected]. TO BE VERIFIED

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions