sentry-ruby
sentry-ruby copied to clipboard
sentry-rails 5.15.2 to 5.16.1 update breaks gitlab - TZInfo::InvalidTimezoneIdentifier: Invalid identifier: (GMT+00:00) UTC
Issue Description
When sentry-rails is updated from 5.10.0 to 5.16.1 (later we found upto 5.15.2 is good) in gitlab, all rake tasks fails with TZInfo::InvalidTimezoneIdentifier: Invalid identifier: (GMT+00:00) UTC
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/144973
Reproduction Steps
For now this gitlab MR reproduces the error
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/144973
Expected Behavior
This should not break gitlab or any rails app
Actual Behavior
I think sentry is adding extra '(GMT+00:00)' to a valid timezone 'UTC'. I tested with many other timezone values in config/application.rb and all fails.
Ruby Version
3.1
SDK Version
3.1
Integration and Its Version
No response
Sentry Config
No response
If we can confirm this is a bug in gitlab, then we can close this issue.
hey, here it says it's the string so I think this is on your end
# application.rb:
class Application < Rails::Application
config.time_zone = 'Eastern Time (US & Canada)'
end
https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html
I have a similar issue during building stage. Downgrading to 5.15.2 helped.
bin/rails aborted!
TZInfo::InvalidTimezoneIdentifier: Invalid identifier: nil (TZInfo::InvalidTimezoneIdentifier)
/app/vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/data_source.rb:316:in `validate_timezone_identifier'
/app/vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_data_source.rb:307:in `load_timezone_info'
/app/vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/data_source.rb:195:in `get_timezone_info'
/app/vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone.rb:128:in `get'
/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.2/lib/active_support/values/time_zone.rb:208:in `find_tzinfo'
/app/vendor/bundle/ruby/3.2.0/gems/sentry-rails-5.17.0/lib/sentry/rails/railtie.rb:75:in `configure_cron_timezone'
/app/vendor/bundle/ruby/3.2.0/gems/railties-7.1.2/lib/rails/railtie.rb:226:in `public_send'
/app/vendor/bundle/ruby/3.2.0/gems/railties-7.1.2/lib/rails/railtie.rb:226:in `method_missing'
/app/vendor/bundle/ruby/3.2.0/gems/sentry-rails-5.17.0/lib/sentry/rails/railtie.rb:43:in `block in <class:Railtie>'
/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.2/lib/active_support/lazy_load_hooks.rb:94:in `block in execute_hook'
/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.2/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'
/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.2/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'
/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.2/lib/active_support/lazy_load_hooks.rb:78:in `block in run_load_hooks'
/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.2/lib/active_support/lazy_load_hooks.rb:77:in `each'
/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.2/lib/active_support/lazy_load_hooks.rb:77:in `run_load_hooks'
/app/vendor/bundle/ruby/3.2.0/gems/railties-7.1.2/lib/rails/application/finisher.rb:93:in `block in <module:Finisher>'
/app/vendor/bundle/ruby/3.2.0/gems/railties-7.1.2/lib/rails/initializable.rb:32:in `instance_exec'
/app/vendor/bundle/ruby/3.2.0/gems/railties-7.1.2/lib/rails/initializable.rb:32:in `run'
/app/vendor/bundle/ruby/3.2.0/gems/railties-7.1.2/lib/rails/initializable.rb:61:in `block in run_initializers'
/app/vendor/bundle/ruby/3.2.0/gems/railties-7.1.2/lib/rails/initializable.rb:60:in `run_initializers'
/app/vendor/bundle/ruby/3.2.0/gems/railties-7.1.2/lib/rails/application.rb:423:in `initialize!'
/app/config/environment.rb:7:in `<main>'