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

Don't update Bundler in generator specs #539

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

tomdracz
Copy link
Collaborator

@tomdracz tomdracz commented Jan 6, 2025

Summary

  • Skip manual update of Bundler when running generator specs
  • Use bundler and rubygems version shipped by ruby/setup-ruby action

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions workflows to use the latest RubyGems version across multiple workflow files
    • Simplified test suite setup by removing Bundler update command in generator specs

Copy link

coderabbitai bot commented Jan 6, 2025

Walkthrough

The pull request involves updates to multiple GitHub Actions workflow files and a test specification file. The primary change across the workflow files is the addition of rubygems: latest to the ruby/setup-ruby@v1 action, ensuring the most recent RubyGems version is used. In the test specification file, the gem update bundler line has been removed from the setup process, potentially simplifying the Rails application installation steps.

Changes

File Change Summary
.github/workflows/dummy.yml Added rubygems: latest to Ruby setup action
.github/workflows/generator.yml Added rubygems: latest to Ruby setup action
.github/workflows/ruby.yml Added rubygems: latest to Ruby setup action in both lint and test jobs
spec/generator_specs/generator_spec.rb Removed gem update bundler line from setup process

Possibly related issues

  • shakacode/shakapacker#534: The changes might address the Bundler version compatibility issue reported in this issue, specifically by removing the manual Bundler update and using the latest RubyGems version.

Poem

🐰 A Ruby workflow, sleek and bright,
Gems updated with all their might
Workflows dance, specs now clean
No more bundler update to glean
CodeRabbit's magic takes its flight! 🚀


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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

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.

@tomdracz tomdracz marked this pull request as ready for review January 6, 2025 14:32
@tomdracz tomdracz changed the title TEST: Don't update Bundler in generator specs Don't update Bundler in generator specs Jan 6, 2025
Copy link

@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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0829d5a and 6aa06a5.

📒 Files selected for processing (4)
  • .github/workflows/dummy.yml (1 hunks)
  • .github/workflows/generator.yml (1 hunks)
  • .github/workflows/ruby.yml (2 hunks)
  • spec/generator_specs/generator_spec.rb (0 hunks)
💤 Files with no reviewable changes (1)
  • spec/generator_specs/generator_spec.rb
⏰ Context from checks skipped due to timeout of 90000ms (19)
  • GitHub Check: Generator specs (ubuntu-latest, 3.3, gemfiles/Gemfile-rails.7.2.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.3, gemfiles/Gemfile-rails.7.1.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.3, gemfiles/Gemfile-rails.7.0.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.2, gemfiles/Gemfile-rails.7.2.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.2, gemfiles/Gemfile-rails.7.1.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.2, gemfiles/Gemfile-rails.7.0.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.2, gemfiles/Gemfile-rails.6.1.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.1, gemfiles/Gemfile-rails.7.2.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.1, gemfiles/Gemfile-rails.7.1.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.1, gemfiles/Gemfile-rails.7.0.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.1, gemfiles/Gemfile-rails.6.1.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.0, gemfiles/Gemfile-rails.7.1.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.0, gemfiles/Gemfile-rails.7.0.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.0, gemfiles/Gemfile-rails.6.1.x)
  • GitHub Check: Generator specs (ubuntu-latest, 3.0, gemfiles/Gemfile-rails.6.0.x)
  • GitHub Check: Generator specs (ubuntu-latest, 2.7, gemfiles/Gemfile-rails.7.1.x)
  • GitHub Check: Generator specs (ubuntu-latest, 2.7, gemfiles/Gemfile-rails.7.0.x)
  • GitHub Check: Generator specs (ubuntu-latest, 2.7, gemfiles/Gemfile-rails.6.1.x)
  • GitHub Check: Generator specs (ubuntu-latest, 2.7, gemfiles/Gemfile-rails.6.0.x)
🔇 Additional comments (3)
.github/workflows/generator.yml (1)

55-55: LGTM! Comprehensive matrix configuration.

The addition of rubygems: latest is consistent with other workflows. The matrix strategy effectively covers various Ruby and Rails version combinations with appropriate exclusions.

.github/workflows/ruby.yml (2)

27-27: LGTM! Consistent RubyGems configuration in lint job.

The addition of rubygems: latest aligns with the changes in other workflows.


73-73: LGTM! Consistent RubyGems configuration in test job.

The addition of rubygems: latest aligns with the changes in other workflows and maintains consistency across the test matrix.

@@ -25,6 +25,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.2'
rubygems: latest
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Consider updating Ruby version in dummy.yml workflow

The workflow uses Ruby 3.1.2 while other workflows (ruby.yml, generator.yml) test against multiple versions up to 3.3. Consider:

  • Aligning with other workflows by using the matrix strategy
  • Or at minimum, updating to Ruby 3.3 to match the latest tested version
🔗 Analysis chain

LGTM! Consider aligning Ruby versions across workflows.

The addition of rubygems: latest is consistent with the changes in other workflows. However, this workflow uses Ruby 3.1.2 while others use version ranges including 3.3.

Let's verify Ruby version usage across workflows:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check Ruby version specifications across workflow files
echo "Ruby version specifications in workflows:"
rg "ruby-version:" .github/workflows/

Length of output: 392


Script:

#!/bin/bash
# Check matrix Ruby version configurations
echo "Matrix configurations in workflows:"
rg "matrix:" -A 5 .github/workflows/

Length of output: 1134

@tomdracz tomdracz requested a review from justin808 January 7, 2025 06:41
@justin808 justin808 merged commit af76122 into main Jan 7, 2025
45 checks passed
@justin808 justin808 deleted the dont-update-bundler-in-generator-specs branch January 7, 2025 20:08
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.

2 participants