celestiaorg / celestia-app

Celestia consensus node
https://celestiaorg.github.io/celestia-app/
Apache License 2.0
345 stars 292 forks source link

Prebuilt binaries are missing from `-arabica` and `-mocha` releases #4033

Open rootulp opened 1 week ago

rootulp commented 1 week ago

Context

https://github.com/celestiaorg/celestia-app/issues/3926 which should've been fixed by https://github.com/celestiaorg/celestia-app/pull/3929

Problem

These releases are missing prebuilt binaries:

Proposal

  1. Investigate why prebuilt binaries weren't attached to those releases
  2. Fix the underlying issue so that subsequent releases have prebuilt binaries auto attached
  3. Manually attach prebuilt binaries for those releases. See https://github.com/celestiaorg/celestia-app/blob/main/docs/maintainers/prebuilt-binaries.md
rootulp commented 1 week ago

v3.0.0-mocha goreleaser was skipped: https://github.com/celestiaorg/celestia-app/actions/runs/11680983880/job/33001958428. The workflow should run if a tag was pushed: https://github.com/celestiaorg/celestia-app/blob/62f232e09dd31cb8340c9c8f5fb8882a06c925dc/.github/workflows/goreleaser.yml#L29 and it appears the tag for that release v3.0.0-mocha was pushed.

v2.3.1-mocha looks like it published a release to v2.3.1: https://github.com/celestiaorg/celestia-app/actions/runs/11596682388/job/32288420499#step:6:102 and not v2.3.1-mocha.

v3.0.0-arabica failed to publish because it fetched the tag v3.0.0-rc0: https://github.com/celestiaorg/celestia-app/actions/runs/11479848124/job/31947080946#step:6:95

v2.3.0-mocha failed to publish because it fetched the tag v2.3.0: https://github.com/celestiaorg/celestia-app/actions/runs/11406322818/job/31739913197#step:6:69

rootulp commented 1 week ago

Created https://discord.com/channels/890434333251362866/1306680628204539975

rootulp commented 1 week ago

Note: https://github.com/celestiaorg/celestia-app/pull/3977 is present on v3.0.0-rc0, v3.0.0-mocha, v3.0.0-arabica. It is not present on v2.x releases so I think that's why tag fetching doesn't work as expected on v2.x.

rootulp commented 1 week ago

Manually published prebuilt binaries for the four releases linked in the OP. Will leave this open until we hear word back from GoReleaser on Discord.

I realized that https://github.com/celestiaorg/celestia-app/pull/3977 fetches the correct version (you can verify for your self via make debug-version) but it doesn't plumb that version into GoReleaser b/c AFAIK there is no option to provide it. So instead, GoReleaser is fetching git tags that point at the current commit (likely via git tag --points-at HEAD) and picking the incorrect one each time. We need a way to provide custom sorting to GoReleaser b/c tags like v2.3.0-arabica, v2.3.0-mocha, v2.3.0-rc0 won't sort correctly by GoReleaser's sort options.

rootulp commented 1 week ago

In the short term we can avoid this issue by ensuring that each release is for a unique commit.

For example:

  1. Create v3.1.0-arabica
  2. Even if v3.1.0-mocha should be functionally identical to v3.1.0-arabica, push a no-op commit and then create v3.1.0-mocha

cc: @evan-forbes

rootulp commented 1 day ago

We should be able to override the current git tag via:

export GORELEASER_CURRENT_TAG=v1.2.3

Ref: https://goreleaser.com/cookbooks/set-a-custom-git-tag/#setting-a-custom-git-tag