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: use goreleaser-cross for goreleaser-check command #3806

Merged
merged 7 commits into from
Aug 22, 2024

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Aug 22, 2024

Closes #3805

goreleaser v2.2.0 deprecated the name_template field in favor of version_template. Our goreleaser-check command used a GH action that was using goreleaser v2.2.0 so we fixed the deprecation in #3797 but the make prebuilt-binary command uses goreleaser-cross which was using a previous version of goreleaser that fails for the new field.

This PR updates the goreleaser-check command to use the goreleaser-cross Docker image so that the check command and prebuilt-binary command uses the same version.

Note: we'll need to update name_template to version_template when we upgrade to Go 1.23.0 because that will use goreleaser-cross 1.23.0 which bumped to goreleaser 2.22.0. See goreleaser/goreleaser-cross#77

@rootulp rootulp added the backport:v2.x PR will be backported automatically to the v2.x branch upon merging label Aug 22, 2024
@rootulp rootulp self-assigned this Aug 22, 2024
@rootulp rootulp requested a review from a team as a code owner August 22, 2024 01:21
@rootulp rootulp requested review from rach-id and ninabarbakadze and removed request for a team August 22, 2024 01:21
Copy link
Contributor

coderabbitai bot commented Aug 22, 2024

Walkthrough

Walkthrough

The changes involve modifications to the GitHub Actions workflow, the Goreleaser configuration, and the Makefile. The workflow file is updated to pin the Goreleaser action to a specific major version for stability. The naming convention for snapshots in the configuration is altered by replacing version_template with name_template. Additionally, a new target is introduced in the Makefile to validate the configuration file.

Changes

Files Change Summary
.github/workflows/goreleaser.yml Updated goreleaser/goreleaser-action version from latest to ~> v1, added fetch tags step, and incorporated Go version setup.
.goreleaser.yaml Changed version_template to name_template for snapshot naming convention.
Makefile Added new target goreleaser-check to validate .goreleaser.yaml configuration.

Assessment against linked issues

Objective Addressed Explanation
Pin to Goreleaser v1.x in goreleaser-check (#[3805])
Revert changes related to version_template (#[3805])

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 658a8d4 and 0c456ad.

Files selected for processing (2)
  • .github/workflows/goreleaser.yml (1 hunks)
  • Makefile (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/goreleaser.yml
Additional comments not posted (1)
Makefile (1)

192-207: LGTM! The goreleaser-check target is well-structured.

The addition of the goreleaser-check target is a valuable enhancement to ensure the configuration file is validated before proceeding with the release process.


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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@celestia-bot celestia-bot requested a review from a team August 22, 2024 01:21
@rootulp rootulp marked this pull request as draft August 22, 2024 01:29
@rootulp rootulp changed the title ci: pin to goreleaser v1 ci: fix goreleaser by upgrading to Go 1.23.0 Aug 22, 2024
@rootulp rootulp changed the title ci: fix goreleaser by upgrading to Go 1.23.0 ci: fix goreleaser Aug 22, 2024
@rootulp rootulp changed the title ci: fix goreleaser ci: use goreleaser-cross for goreleaser-check command Aug 22, 2024
@rootulp rootulp marked this pull request as ready for review August 22, 2024 02:02
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)
Makefile (1)

194-196: Consider improving the error message formatting.

The error message could be formatted for better readability by breaking it into multiple lines or using a heredoc.

Consider using a heredoc for the error message:

@if [ ! -f ".release-env" ]; then \
  cat <<EOF
A .release-env file was not found but is required to create prebuilt binaries.
This command is expected to be run in CI where a .release-env file exists.
If you need to run this command locally to attach binaries to a release, you need to create a .release-env file with a Github token (classic) that has repo:public_repo scope.
EOF
  exit 1; \
fi

Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

utAck

Copy link
Member

@ninabarbakadze ninabarbakadze left a comment

Choose a reason for hiding this comment

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

another utAck from me

@rootulp rootulp merged commit 13f3098 into celestiaorg:main Aug 22, 2024
39 checks passed
@rootulp rootulp deleted the rp/fix-goreleaser branch August 22, 2024 17:02
mergify bot pushed a commit that referenced this pull request Aug 22, 2024
Closes #3805

[goreleaser
v2.2.0](https://github.com/goreleaser/goreleaser/releases/tag/v2.2.0)
deprecated the `name_template` field in favor of `version_template`. Our
goreleaser-check command used a GH action that was using goreleaser
v2.2.0 so we fixed the deprecation in
#3797 but the make
prebuilt-binary command uses goreleaser-cross which was using a previous
version of goreleaser that fails for the new field.

This PR updates the goreleaser-check command to use the goreleaser-cross
Docker image so that the check command and prebuilt-binary command uses
the same version.

Note: we'll need to update `name_template` to `version_template` when we
upgrade to Go 1.23.0 because that will use goreleaser-cross 1.23.0 which
bumped to goreleaser 2.22.0. See
goreleaser/goreleaser-cross#77

(cherry picked from commit 13f3098)
rootulp added a commit that referenced this pull request Aug 22, 2024
#3813)

Closes #3805

[goreleaser
v2.2.0](https://github.com/goreleaser/goreleaser/releases/tag/v2.2.0)
deprecated the `name_template` field in favor of `version_template`. Our
goreleaser-check command used a GH action that was using goreleaser
v2.2.0 so we fixed the deprecation in
#3797 but the make
prebuilt-binary command uses goreleaser-cross which was using a previous
version of goreleaser that fails for the new field.

This PR updates the goreleaser-check command to use the goreleaser-cross
Docker image so that the check command and prebuilt-binary command uses
the same version.

Note: we'll need to update `name_template` to `version_template` when we
upgrade to Go 1.23.0 because that will use goreleaser-cross 1.23.0 which
bumped to goreleaser 2.22.0. See
https://github.com/goreleaser/goreleaser-cross/pull/77<hr>This is an
automatic backport of pull request #3806 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.

goreleaser-cross doesn't support version_template
3 participants