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

ci(goreleaser): fix release candidate suffix #3833

Merged
merged 6 commits into from
Aug 30, 2024

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Aug 28, 2024

Prevents #3819 from happening again. Also adds a document so other maintainers can generate + upload prebuilt binaries if they don't work again in the future.

The current -rc* prerelease_suffix was not working because goreleaser treated v2.1.2-rc1 as more recent than v2.1.2 in the failing workflow. This resolves by removing the *.

Testing

  1. Worked on my fork: https://github.com/rootulp/celestia-app/releases/tag/v2.1.2
  2. Worked on this repo: https://github.com/celestiaorg/celestia-app/releases/tag/v2.1.2

Before

    • git state                                      commit=48173df3dc78f9348eedb3796f29ef9e9e5dc584 branch=HEAD current_tag=v2.1.2-rc1 previous_tag=v2.1.2-rc0 dirty=true

After

    • git state                                      commit=48173df3dc78f9348eedb3796f29ef9e9e5dc584 branch=HEAD current_tag=v2.1.2 previous_tag=v2.1.2-rc0 dirty=true

It is curious that it thinks the previous tag is v2.1.2-rc0 and not v2.1.2-rc1 but I couldn't fix with various tag_sort options. I think this only impacts Goreleaser changelog generation which we don't use b/c we use Github's auto generate release notes feature.

@rootulp rootulp self-assigned this Aug 28, 2024
@rootulp rootulp added the backport:v2.x PR will be backported automatically to the v2.x branch upon merging label Aug 28, 2024
.goreleaser.yaml Outdated Show resolved Hide resolved
.goreleaser.yaml Outdated Show resolved Hide resolved
.goreleaser.yaml Outdated Show resolved Hide resolved
@rootulp rootulp changed the title ci(goreleaser): use semver sorting ci(goreleaser): fix prerelease_suffix Aug 30, 2024
@rootulp rootulp marked this pull request as ready for review August 30, 2024 03:24
@rootulp rootulp requested review from liamsi and a team as code owners August 30, 2024 03:24
@rootulp rootulp requested review from staheri14 and rach-id and removed request for a team August 30, 2024 03:24
Copy link
Contributor

coderabbitai bot commented Aug 30, 2024

Walkthrough

Walkthrough

The changes involve modifying the prerelease_suffix in the .goreleaser.yaml configuration from "-rc*" to "-rc", which alters how pre-release versions are tagged. Additionally, a new documentation file docs/maintainers/prebuilt-binaries.md has been introduced, detailing the management of prebuilt binaries for releases, including prerequisites and manual attachment steps.

Changes

Files Change Summary
.goreleaser.yaml Changed prerelease_suffix from "-rc*" to "-rc".
docs/maintainers/prebuilt-binaries.md Introduced documentation on managing prebuilt binaries, including prerequisites and manual steps.

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 62aae1f and cfcf009.

Files selected for processing (2)
  • .goreleaser.yaml (1 hunks)
  • docs/maintainers/prebuilt-binaries.md (1 hunks)
Additional context used
LanguageTool
docs/maintainers/prebuilt-binaries.md

[style] ~16-~16: Consider using a different verb for a more formal wording.
Context: ...If you need to make any code changes to fix the issue that occured when CI tried to...

(FIX_RESOLVE)

Additional comments not posted (5)
docs/maintainers/prebuilt-binaries.md (4)

1-3: LGTM!

The introduction is clear and concise.


5-12: LGTM!

The prerequisites section is clear and well-documented.


18-36: LGTM!

The Makefile modification section is clear and well-documented.


38-49: LGTM!

The remaining steps are clear and detailed.

.goreleaser.yaml (1)

121-121: LGTM!

The change to the prerelease_suffix field is straightforward and aligns with the PR objectives.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@rootulp rootulp changed the title ci(goreleaser): fix prerelease_suffix ci(goreleaser): fix release candidate suffix Aug 30, 2024
@rootulp rootulp enabled auto-merge (squash) August 30, 2024 03:25
@rootulp rootulp requested review from cmwaters, evan-forbes and ninabarbakadze and removed request for liamsi August 30, 2024 03:25
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
docs/maintainers/prebuilt-binaries.md (1)

14-16: Consider using a different verb for a more formal wording.

The phrase "fix the issue that occurred" can be improved for formality.

Apply this diff to improve formality:

- If you need to make any code changes to fix the issue that occured when CI tried to generate and attach the prebuilt binaries,
+ If you need to make any code changes to resolve the issue that occurred when CI tried to generate and attach the prebuilt binaries,
Tools
LanguageTool

[style] ~16-~16: Consider using a different verb for a more formal wording.
Context: ...If you need to make any code changes to fix the issue that occured when CI tried to...

(FIX_RESOLVE)

Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

utAck

@rootulp rootulp merged commit 2931f15 into celestiaorg:main Aug 30, 2024
33 checks passed
mergify bot pushed a commit that referenced this pull request Aug 30, 2024
Prevents #3819 from
happening again. Also adds a document so other maintainers can generate
+ upload prebuilt binaries if they don't work again in the future.

The current `-rc*`
[prerelease_suffix](https://goreleaser.com/customization/git/#git) was
not working because goreleaser treated v2.1.2-rc1 as more recent than
v2.1.2 in the [failing
workflow](https://github.com/celestiaorg/celestia-app/actions/runs/10523365886/job/29157983992#step:6:68).
This resolves by removing the `*`.

## Testing

1. Worked on my fork:
https://github.com/rootulp/celestia-app/releases/tag/v2.1.2
2. Worked on this repo:
https://github.com/celestiaorg/celestia-app/releases/tag/v2.1.2

### Before

```
    • git state                                      commit=48173df3dc78f9348eedb3796f29ef9e9e5dc584 branch=HEAD current_tag=v2.1.2-rc1 previous_tag=v2.1.2-rc0 dirty=true
```
### After

```
    • git state                                      commit=48173df3dc78f9348eedb3796f29ef9e9e5dc584 branch=HEAD current_tag=v2.1.2 previous_tag=v2.1.2-rc0 dirty=true
```

It is curious that it thinks the previous tag is v2.1.2-rc0 and not
v2.1.2-rc1 but I couldn't fix with various
[tag_sort](https://goreleaser.com/customization/git/?h=tag_sort#git)
options. I think this only impacts Goreleaser changelog generation which
we don't use b/c we use Github's auto generate release notes feature.

(cherry picked from commit 2931f15)
rootulp added a commit that referenced this pull request Sep 3, 2024
Prevents #3819 from
happening again. Also adds a document so other maintainers can generate
+ upload prebuilt binaries if they don't work again in the future.

The current `-rc*`
[prerelease_suffix](https://goreleaser.com/customization/git/#git) was
not working because goreleaser treated v2.1.2-rc1 as more recent than
v2.1.2 in the [failing
workflow](https://github.com/celestiaorg/celestia-app/actions/runs/10523365886/job/29157983992#step:6:68).
This resolves by removing the `*`.

## Testing

1. Worked on my fork:
https://github.com/rootulp/celestia-app/releases/tag/v2.1.2
2. Worked on this repo:
https://github.com/celestiaorg/celestia-app/releases/tag/v2.1.2

### Before

```
    • git state                                      commit=48173df3dc78f9348eedb3796f29ef9e9e5dc584 branch=HEAD current_tag=v2.1.2-rc1 previous_tag=v2.1.2-rc0 dirty=true
```
### After

```
    • git state                                      commit=48173df3dc78f9348eedb3796f29ef9e9e5dc584 branch=HEAD current_tag=v2.1.2 previous_tag=v2.1.2-rc0 dirty=true
```

It is curious that it thinks the previous tag is v2.1.2-rc0 and not
v2.1.2-rc1 but I couldn't fix with various
[tag_sort](https://goreleaser.com/customization/git/?h=tag_sort#git)
options. I think this only impacts Goreleaser changelog generation which
we don't use b/c we use Github's auto generate release notes
feature.<hr>This is an automatic backport of pull request #3833 done by
[Mergify](https://mergify.com).

Co-authored-by: Rootul P <rootulp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:v2.x PR will be backported automatically to the v2.x branch upon merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants