From 7b205a4fd6e6c2af975007a04251e987a67220eb Mon Sep 17 00:00:00 2001 From: st0012 Date: Sat, 25 Sep 2021 21:58:16 +0800 Subject: [PATCH 1/3] Run CI against Rails 7 --- .github/workflows/sentry_rails_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sentry_rails_test.yml b/.github/workflows/sentry_rails_test.yml index 022266258..d0ff57d29 100644 --- a/.github/workflows/sentry_rails_test.yml +++ b/.github/workflows/sentry_rails_test.yml @@ -22,6 +22,7 @@ jobs: include: - { os: ubuntu-latest, ruby_version: '3.0', rails_version: 6.1.0, options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal" } } - { os: ubuntu-latest, ruby_version: '2.7', rails_version: 6.1.0, options: { codecov: 1 } } + - { os: ubuntu-latest, ruby_version: '2.7', rails_version: 7.0.0.alpha } exclude: - ruby_version: 2.4 rails_version: 6.0.0 From e21fac946b3d2d03ff11aae86a98a49f42054df9 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sat, 25 Sep 2021 22:41:05 +0800 Subject: [PATCH 2/3] Add workaround to avoid FrozenError when initializing testing Rails apps See: https://github.com/rails/rails/issues/42319 --- sentry-rails/spec/support/test_rails_app/app.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sentry-rails/spec/support/test_rails_app/app.rb b/sentry-rails/spec/support/test_rails_app/app.rb index 4f61aeeb5..ccd232880 100644 --- a/sentry-rails/spec/support/test_rails_app/app.rb +++ b/sentry-rails/spec/support/test_rails_app/app.rb @@ -88,6 +88,11 @@ def not_found end def make_basic_app + # Rails removes the support of multiple instances, which includes freezing some setting values. + # This is the workaround to avoid FrozenError. Related issue: https://github.com/rails/rails/issues/42319 + ActiveSupport::Dependencies.autoload_once_paths = [] + ActiveSupport::Dependencies.autoload_paths = [] + app = Class.new(TestApp) do def self.name "RailsTestApp" From 783323361190a7ad4fed59df3f42290951026635 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sat, 25 Sep 2021 22:56:01 +0800 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f76538bb2..a9f7315e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## Unreleased + +### Miscellaneous + +- Start Testing Against Rails 7.0 [#1581](https://github.com/getsentry/sentry-ruby/pull/1581) + ## 4.7.3 - Avoid leaking tracing timestamp to breadcrumbs [#1575](https://github.com/getsentry/sentry-ruby/pull/1575)