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

Improve CI #512

Merged
merged 4 commits into from
Sep 12, 2024
Merged

Improve CI #512

merged 4 commits into from
Sep 12, 2024

Conversation

tagliala
Copy link
Contributor

@tagliala tagliala commented Sep 1, 2024

Summary

Pull Request checklist

  • Add/update test to cover these changes
  • Update documentation
  • Update CHANGELOG file

Other Information

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced support for Rails version 7.2.x, enhancing compatibility for users.
    • Added a new gemfile specifically for Rails 7.2.x, allowing for tailored dependency management.
  • Bug Fixes

    • Updated exclusion criteria for Ruby versions 2.7 and 3.0 to prevent compatibility issues with the new gemfile.
  • Improvements

    • Updated Rails version in the 6.0.x gemfile to a stable release, improving application stability.
    • Removed the "arel" gem dependency from multiple gemfiles, streamlining dependency management.

Copy link

coderabbitai bot commented Sep 1, 2024

Walkthrough

The changes involve the addition of a new Rails gemfile, Gemfile-rails.7.2.x, to the workflow configuration for Ruby applications. This new gemfile specifies dependencies for Rails version 7.2.x and includes exclusions for Ruby versions 2.7 and 3.0. Additionally, existing gemfiles for Rails versions 6.0.x, 6.1.x, and 7.0.x have had their dependencies adjusted, primarily by removing the arel gem and updating the Rails version in 6.0.x to a stable release.

Changes

Files Change Summary
.github/workflows/generator.yml Added gemfiles/Gemfile-rails.7.2.x; excluded Ruby versions 2.7 and 3.0 for this gemfile.
.github/workflows/ruby.yml Added gemfiles/Gemfile-rails.7.2.x; excluded Ruby versions 2.7 and 3.0 for this gemfile.
gemfiles/Gemfile-rails.6.0.x Updated Rails version from 6.0.0.rc2 to 6.0.0.
gemfiles/Gemfile-rails.6.1.x Removed dependency on arel gem from GitHub.
gemfiles/Gemfile-rails.7.0.x Removed dependency on arel gem from GitHub.
gemfiles/Gemfile-rails.7.1.x Removed dependency on arel gem from GitHub.
gemfiles/Gemfile-rails.7.2.x Created new gemfile specifying dependencies for Rails 7.2.x, including rails, rake, rack-proxy, rspec-rails, and byebug.

Poem

🐰 In fields of code, I hop with glee,
New gems and versions, oh joy for me!
Rails 7.2, a wondrous sight,
With dependencies shining bright.
Exclusions set, the path is clear,
Hopping along, I spread the cheer! 🌼✨


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2e1e194 and fd80df0.

Files ignored due to path filters (2)
  • Gemfile.lock is excluded by !**/*.lock
  • spec/dummy/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing (7)
  • .github/workflows/generator.yml (1 hunks)
  • .github/workflows/ruby.yml (1 hunks)
  • gemfiles/Gemfile-rails.6.0.x (1 hunks)
  • gemfiles/Gemfile-rails.6.1.x (1 hunks)
  • gemfiles/Gemfile-rails.7.0.x (1 hunks)
  • gemfiles/Gemfile-rails.7.1.x (1 hunks)
  • gemfiles/Gemfile-rails.7.2.x (1 hunks)
Files skipped from review due to trivial changes (4)
  • gemfiles/Gemfile-rails.6.0.x
  • gemfiles/Gemfile-rails.7.0.x
  • gemfiles/Gemfile-rails.7.1.x
  • gemfiles/Gemfile-rails.7.2.x
Additional comments not posted (3)
gemfiles/Gemfile-rails.6.1.x (1)

Line range hint 1-12: Verify the impact of removing the arel gem.

The arel gem has been removed from the Gemfile. This change may impact the application's functionality if it was previously relied upon for query construction or execution.

Verify that the application's functionality is not affected by the removal of the arel gem. Run the following script to search for arel usage in the codebase:

If the script returns any occurrences of arel usage, ensure that the functionality is not affected by the removal of the gem. If necessary, consider adding the arel gem back to the Gemfile or refactoring the code to remove the dependency on arel.

Verification successful

No occurrences of arel found in the codebase. The rg command did not return any results, indicating that the arel gem is not used in the codebase. Therefore, its removal from the Gemfile should not impact the application's functionality.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for `arel` usage in the codebase.

# Test: Search for `arel` usage. Expect: No occurrences of `arel` usage.
rg --type ruby -i $'arel'

Length of output: 24


Script:

#!/bin/bash
# Re-run the search for `arel` usage in the codebase to confirm its presence or absence.
rg --type ruby -i arel

Length of output: 24

.github/workflows/generator.yml (1)

27-27: LGTM!

The changes to the workflow configuration are approved:

  • The addition of the new gemfile entry for Rails 7.2.x expands the compatibility range of the workflow.
  • The exclusion of Ruby versions 2.7 and 3.0 for the Rails 7.2.x gemfile ensures that these versions are not tested against Rails 7.2.x.

Also applies to: 32-35

.github/workflows/ruby.yml (1)

44-44: LGTM!

The changes to the workflow configuration are approved:

  • The addition of the new gemfile entry for Rails 7.2.x expands the compatibility range of the workflow.
  • The exclusion of Ruby versions 2.7 and 3.0 for the Rails 7.2.x gemfile ensures that these versions are not tested against Rails 7.2.x.

Also applies to: 49-52


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

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.

@tagliala tagliala changed the title Chore/fix ci Improve CI Sep 1, 2024
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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bb91266 and 99e324e.

Files ignored due to path filters (2)
  • Gemfile.lock is excluded by !**/*.lock
  • spec/dummy/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing (2)
  • .github/workflows/ruby.yml (1 hunks)
  • gemfiles/Gemfile-rails.7.2.x (1 hunks)
Additional comments not posted (3)
gemfiles/Gemfile-rails.7.2.x (1)

1-12: LGTM!

The new Gemfile-rails.7.2.x file is well-structured and includes the necessary dependencies for Rails 7.2.x. The file specifies the following:

  • The source for Ruby gems (https://rubygems.org).
  • A git source for custom repositories.
  • The path to the gemspec file.
  • The Rails gem with version constraint ~>7.2.0.
  • The Arel gem from the Rails GitHub repository.
  • The Rake gem with a minimum version of 11.1.
  • The rack-proxy gem with the require: false option.
  • The rspec-rails gem for testing with version ~> 6.0.0.
  • The byebug gem for debugging.

The dependencies are appropriate for a Rails 7.2.x application and do not raise any concerns.

.github/workflows/ruby.yml (2)

44-44: LGTM!

The addition of gemfiles/Gemfile-rails.7.2.x to the list of gemfiles enables testing with Rails 7.2.x in the GitHub Actions workflow. This change is consistent with the existing structure and ensures that the workflow covers the latest supported Rails version.


49-52: LGTM!

The exclusion criteria for Ruby versions 2.7 and 3.0 when using gemfiles/Gemfile-rails.7.2.x are appropriate. This ensures that these older Ruby versions are not used with Rails 7.2.x, maintaining compatibility and avoiding potential issues.

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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 99e324e and 2e1e194.

Files ignored due to path filters (2)
  • Gemfile.lock is excluded by !**/*.lock
  • spec/dummy/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing (7)
  • .github/workflows/generator.yml (1 hunks)
  • .github/workflows/ruby.yml (1 hunks)
  • gemfiles/Gemfile-rails.6.0.x (1 hunks)
  • gemfiles/Gemfile-rails.6.1.x (1 hunks)
  • gemfiles/Gemfile-rails.7.0.x (1 hunks)
  • gemfiles/Gemfile-rails.7.1.x (1 hunks)
  • gemfiles/Gemfile-rails.7.2.x (1 hunks)
Files skipped from review due to trivial changes (3)
  • gemfiles/Gemfile-rails.6.1.x
  • gemfiles/Gemfile-rails.7.0.x
  • gemfiles/Gemfile-rails.7.1.x
Files skipped from review as they are similar to previous changes (1)
  • gemfiles/Gemfile-rails.7.2.x
Additional comments not posted (3)
gemfiles/Gemfile-rails.6.0.x (1)

5-5: LGTM!

The change updates the Rails version from a pre-release candidate to a stable version, which is a good practice for production use.

.github/workflows/generator.yml (1)

27-27: LGTM!

The changes add support for Rails 7.2.x and exclude incompatible Ruby versions, which is a good practice to ensure the workflow runs with compatible versions.

Also applies to: 32-35

.github/workflows/ruby.yml (1)

44-44: LGTM!

The changes add support for Rails 7.2.x and exclude incompatible Ruby versions, which is a good practice to ensure the workflow runs with compatible versions.

Also applies to: 49-52

Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

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

LGTM.

@tomdracz @G-Rath OK with you guys to drop 2.7 and 3 ruby from CI?

Copy link
Contributor

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

looks good to me - just to be clear @justin808 CI is still running against Ruby 2.7 and 3.0, we're just not running the Rails 7.2 tests against it since it doesn't support those versions of Ruby

There should be no reason to get arel from `github` and the commit
history is not clear.
@justin808 justin808 merged commit 6bf1025 into shakacode:main Sep 12, 2024
45 checks passed
@justin808
Copy link
Member

Thanks @tagliala!

@tagliala tagliala deleted the chore/fix-ci branch September 12, 2024 09:57
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.

3 participants