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

Fix rails 7.1 support and migrate to github actions #131

Merged
merged 9 commits into from
Feb 13, 2024

Conversation

bliof-fc
Copy link
Member

@bliof-fc bliof-fc commented Feb 9, 2024

Migrate to github actions

Run tests against:

  • ruby 2.7
  • ruby 3.0
  • ruby 3.1
  • ruby 3.2
  • ruby 3.3

Test with rails - 5.2, 6.0, 6.1, 7.0, 7.1
Test with sinatra - 1.4, 2.2, 3.2, 4.0
Test with sidekiq - 5.1, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 7.0, 7.1, 7.x

Fix for rails 7.1

  • lib/loga/railtie.rb is changed to work with rails 7.1

In rails 7.1 https://github.com/rails/rails/blob/v7.1.3/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#L56
vs rails 7.0 https://github.com/rails/rails/blob/v7.0.8/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#L54

With rails 7.1 there is also a new ActiveSupport::BroadcastLogger, that is currently not in use by loga
https://github.com/rails/rails/blob/v7.1.3/activesupport/lib/active_support/broadcast_logger.rb

@fc-infosec-sast
Copy link

fc-infosec-sast commented Feb 9, 2024

✅ SAST Report

No issues found. Good job! 💪

@bliof-fc bliof-fc force-pushed the migrate-to-gh-actions branch 6 times, most recently from fc18ba3 to 12523eb Compare February 9, 2024 15:40
Add sinatra2, sinatra3, sinatra4
Remove rails42, rails50
The main part of the project will be fixed in a separate PR.
In ruby 3.3 it is just `undefined method 'name' for nil`
In the others, it is nil:NilClass
@bliof-fc bliof-fc force-pushed the migrate-to-gh-actions branch 4 times, most recently from b98a5ee to d60061a Compare February 12, 2024 11:10
@bliof-fc bliof-fc changed the title Migrate to github actions Fix rails 7.1 support and migrate to github actions Feb 12, 2024
Add rails 7.1
Remove fixutures for 4.2 and 5.0

Add mutex_m for ruby 3.3.0
Add base64 gem to rails 7.0 and 7.1 to fix:

```
> BUNDLE_GEMFILE=/home/runner/work/loga/loga/gemfiles/rails70.gemfile bundle exec rspec
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.4.0+0/gems/activesupport-7.0.8/lib/active_support/message_verifier.rb:4: warning: base64 was loaded from the standard library, but is not part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec.

Failure/Error: require 'rails'

LoadError:
  cannot load such file -- base64
```

https://stdgems.org/base64/

The root issue is that in old ruby version base64 0.1.1 should be used
and base64 0.2.0 is just for ruby 3.3.0

There is some new ActiveSupport::BroadcastLogger in development in rails
7.1 that is not getting assigned to the Loga.logger. This will be
checked in a followup change
Copy link
Contributor

@sgerrand sgerrand left a comment

Choose a reason for hiding this comment

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

👋 Hello, FC crew! Thanks for maintaining this gem. I've added some small non-blocking suggestions.

.github/workflows/build-and-test.yml Outdated Show resolved Hide resolved
.github/workflows/build-and-test.yml Outdated Show resolved Hide resolved
bliof-fc and others added 2 commits February 13, 2024 10:41
Add ruby 3.3 to the matrix. `head` is 3.3 but will change in the future.

Co-authored-by: Sasha Gerrand <sgerrand@users.noreply.github.com>
Fix logging of exceptions in rails 7.1
Update the CI pipeline
@bliof-fc bliof-fc merged commit 0a39c78 into master Feb 13, 2024
11 checks passed
@bliof-fc bliof-fc deleted the migrate-to-gh-actions branch February 13, 2024 10:04
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.

None yet

4 participants