Skip to content

Commit

Permalink
Fix the build (#2463)
Browse files Browse the repository at this point in the history
* [delayed_job] pin activerecord-jdbcmysql-adapter to a specific sha for now

They bumped it to 9.1.0 and we need < 9

jruby/activerecord-jdbc-adapter@0a959b8

* [delayed_job] update sqlite for older rubies

this fixes the spec suite

* [sidekiq] fix specs
  • Loading branch information
solnic authored Nov 14, 2024
1 parent ceba0da commit 5de4ebc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions sentry-delayed_job/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ gem "rails", "> 5.0.0"

platform :jruby do
# See https://github.com/jruby/activerecord-jdbc-adapter/issues/1139
gem "activerecord-jdbcmysql-adapter", github: "jruby/activerecord-jdbc-adapter"
gem "activerecord-jdbcmysql-adapter", github: "jruby/activerecord-jdbc-adapter", ref: "6b3983bbbfda75ee2a1f5bc4c8d35efd7b71d84b"
gem "jdbc-sqlite3"
end

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.0")
ruby_version = Gem::Version.new(RUBY_VERSION)

if ruby_version < Gem::Version.new("2.5.0")
gem "sqlite3", "~> 1.3.0", platform: :ruby
else
gem "sqlite3", "~> 1.6.9", platform: :ruby
elsif ruby_version < Gem::Version.new("3.0.0")
gem "sqlite3", "~> 1.6.0", platform: :ruby
elsif ruby_version >= Gem::Version.new("3.0.0") && ruby_version < Gem::Version.new("3.1.0")
gem "sqlite3", "~> 1.7.0", platform: :ruby
elsif ruby_version >= Gem::Version.new("3.1.0")
gem "sqlite3", "~> 2.2", platform: :ruby
end

eval_gemfile File.expand_path("../Gemfile", __dir__)
2 changes: 1 addition & 1 deletion sentry-ruby/spec/sentry/client/event_sending_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

client.capture_event(event, scope)

expect(string_io.string).to include("Converting event (#{event.event_id}) to JSON compatible hash failed: source sequence is illegal/malformed utf-8")
expect(string_io.string).to match(/Converting event \(#{event.event_id}\) to JSON compatible hash failed:.*illegal\/malformed utf-8/i)
end
end

Expand Down
2 changes: 1 addition & 1 deletion sentry-sidekiq/spec/sentry/sidekiq/cron/job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
end

before do
stub_const('Job', Class.new { def perform; end })
stub_const('Job', Class.new { include Sidekiq::Worker; def perform; end })
end

it 'patches class' do
Expand Down

0 comments on commit 5de4ebc

Please sign in to comment.