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

Release v6.26.1 #809

Merged
merged 24 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
70971ae
Update so gemspec changelog url include the version
stoivo Aug 3, 2023
252bcd9
Merge pull request #789 from stoivo/stoivo-patch-1
imjoehaines Aug 9, 2023
bf61828
Fix mailman dependency error on Ruby 2.0
imjoehaines Aug 11, 2023
e169980
Fix sidekiq deprecation warning
fukayatsu Oct 11, 2023
866a689
Fix when resque failure backend is already multiple
sj26 Nov 15, 2023
17f7d93
Add #803 reproduction to rails_integrations app
imjoehaines Dec 15, 2023
84234e3
Add changelog entry
imjoehaines Dec 15, 2023
a219d78
Merge pull request #803 from sj26/fix-resque-failure-backend-multiple
imjoehaines Dec 15, 2023
8cedf10
Ensure cache is unique per build
imjoehaines Dec 14, 2023
1b40f2c
Install a compatible Thor version on Ruby <2.6
imjoehaines Dec 14, 2023
f32b5cf
Only call Que.migrate! once
imjoehaines Dec 14, 2023
e1a4e3f
Remove activerecord dependency
imjoehaines Dec 14, 2023
8d19668
Test Que 0.14 on older Ruby versions
imjoehaines Dec 14, 2023
c14b1e3
Check que_jobs exists before queueing jobs
imjoehaines Dec 15, 2023
ee7ffbd
Merge pull request #796 from fukayatsu/fix-sidekiq-deprecation-warning
imjoehaines Dec 18, 2023
58a9b60
Update changelog
imjoehaines Dec 18, 2023
3df6c85
Redact URLs in automatic Rails breadcrumbs
imjoehaines Dec 11, 2023
a18664c
Fix dependency issue on Ruby 2.7 in rails7 fixture
imjoehaines Jan 4, 2024
5801904
Assert against in-project frames only
imjoehaines Jan 4, 2024
ca7e847
Update 'undefined local variable' error message
imjoehaines Jan 4, 2024
86d7c35
Bump Ruby 3.2 -> 3.3 in Maze Runner tests
imjoehaines Jan 3, 2024
5240a4f
Add Ruby 3.3 to test matrix
imjoehaines Jan 3, 2024
a1c41ff
Bump version
imjoehaines Jan 8, 2024
bd82b85
Add version & date to changelog
imjoehaines Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/maze-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['1.9', '3.2']
ruby-version: ['1.9', '3.3']

uses: ./.github/workflows/run-maze-runner.yml
with:
Expand Down Expand Up @@ -36,11 +36,11 @@ jobs:
rack-version: '1'
- ruby-version: '2.2'
rack-version: '2'
- ruby-version: '3.2'
- ruby-version: '3.3'
rack-version: '2'
- ruby-version: '2.4'
rack-version: '3'
- ruby-version: '3.2'
- ruby-version: '3.3'
rack-version: '3'

uses: ./.github/workflows/run-maze-runner.yml
Expand All @@ -56,7 +56,7 @@ jobs:
include:
- ruby-version: '2.0'
que-version: '0.14'
- ruby-version: '3.2'
- ruby-version: '2.5'
que-version: '0.14'
- ruby-version: '2.5'
que-version: '1'
Expand All @@ -76,7 +76,7 @@ jobs:
ruby-version: ['2.5', '2.7']
sidekiq-version: ['2', '3', '4', '5', '6', '7']
include:
- ruby-version: '3.2'
- ruby-version: '3.3'
sidekiq-version: '7'
exclude:
# 2.7 is the minimum ruby version that sidekiq 7 supports
Expand Down Expand Up @@ -127,15 +127,15 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['2.7', '3.2']
ruby-version: ['2.7', '3.3']
rails-version: ['6', '7', '_integrations']
include:
- ruby-version: '2.5'
rails-version: '6'
exclude:
- ruby-version: '2.7'
rails-version: '6'
- ruby-version: '3.2'
- ruby-version: '3.3'
rails-version: '_integrations'

uses: ./.github/workflows/run-maze-runner.yml
Expand All @@ -148,7 +148,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['1.9', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
ruby-version: ['1.9', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']

uses: ./.github/workflows/run-maze-runner.yml
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-maze-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
with:
ruby-version: 2.7
bundler-cache: true
cache-version: ${{ inputs.ruby-version }}-${{ inputs.rack-version }}-${{ inputs.que-version }}-${{ inputs.rails-version }}-${{ inputs.sidekiq-version }}

- run: bundle exec maze-runner ${{ inputs.features }} --no-source
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
optional-groups: ['test sidekiq']
include:
- ruby-version: '1.9'
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
Changelog
=========

## v6.26.1 (9 January 2024)

### Fixes

* Fix deprecation warning from Sidekiq error handler
| [#796](https://github.com/bugsnag/bugsnag-ruby/pull/796)
| [fukayatsu](https://github.com/fukayatsu)
* Fix Resque integration when failure backend is already `Resque::Failure::Multiple`
| [#803](https://github.com/bugsnag/bugsnag-ruby/pull/803)
| [sj26](https://github.com/sj26)
* Redact URLs in automatic Rails breadcrumbs
| [#806](https://github.com/bugsnag/bugsnag-ruby/pull/806)

## v6.26.0 (19 July 2023)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.26.0
6.26.1
2 changes: 1 addition & 1 deletion bugsnag.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |s|

if s.respond_to?(:metadata=)
s.metadata = {
"changelog_uri" => "https://github.com/bugsnag/bugsnag-ruby/blob/HEAD/CHANGELOG.md",
"changelog_uri" => "https://github.com/bugsnag/bugsnag-ruby/blob/v#{File.read("VERSION").strip}/CHANGELOG.md",
"documentation_uri" => "https://docs.bugsnag.com/platforms/ruby/",
"source_code_uri" => "https://github.com/bugsnag/bugsnag-ruby/",
"rubygems_mfa_required" => "true"
Expand Down
4 changes: 2 additions & 2 deletions features/fixtures/expected_breadcrumbs/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"controller": "BreadcrumbsController",
"action": "handled",
"method": "GET",
"path": "/breadcrumbs/handled",
"path": "/breadcrumbs/handled?password=[FILTERED]&abc=xyz",
"event_name": "start_processing.action_controller",
"event_id": ".*"
}
}
}
3 changes: 3 additions & 0 deletions features/fixtures/mailman/app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ gem 'rack', '~> 1.6.11'

# Install a compatible FFI version on Ruby <2.3
gem 'ffi', '< 1.13.0' if RUBY_VERSION < '2.3.0'

# Install a compatible mini_mime version on Ruby <2.6
gem 'mini_mime', '< 1.1.4' if RUBY_VERSION < '2.6.0'
3 changes: 2 additions & 1 deletion features/fixtures/plain/app/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ def configure_basics
Bugsnag.configure do |conf|
conf.api_key = ENV['BUGSNAG_API_KEY']
conf.set_endpoints(ENV['BUGSNAG_ENDPOINT'], ENV["BUGSNAG_ENDPOINT"])
conf.project_root = File.dirname(File.realpath(__FILE__))
end
end

Expand All @@ -17,7 +18,7 @@ def configure_using_environment
conf.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS"
conf.meta_data_filters << ENV["BUGSNAG_META_DATA_FILTERS"] if ENV.include? "BUGSNAG_META_DATA_FILTERS"
conf.enabled_release_stages = [ENV["BUGSNAG_NOTIFY_RELEASE_STAGE"]] if ENV.include? "BUGSNAG_NOTIFY_RELEASE_STAGE"
conf.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT"
conf.project_root = File.dirname(File.realpath(__FILE__))
conf.proxy_host = ENV["BUGSNAG_PROXY_HOST"] if ENV.include? "BUGSNAG_PROXY_HOST"
conf.proxy_password = ENV["BUGSNAG_PROXY_PASSWORD"] if ENV.include? "BUGSNAG_PROXY_PASSWORD"
conf.proxy_port = ENV["BUGSNAG_PROXY_PORT"] if ENV.include? "BUGSNAG_PROXY_PORT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

callback = Proc.new do |report|
report.exceptions[0][:stacktrace].each_with_index do |frame, index|
if index > 0
if index == 0
frame[:inProject] = nil
else
frame[:inProject] = true
end
end
end

run(callback)
run(callback)
1 change: 0 additions & 1 deletion features/fixtures/que/app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ que_version = ENV.fetch("QUE_VERSION")
gem "que", "~> #{que_version}"

gem "pg", RUBY_VERSION < "2.2.0" ? "0.21.0" : "> 0.21.0"
gem "activerecord", RUBY_VERSION < "2.2.0" ? "4.2.11" : "> 4.2.11"

# Install a compatible Minitest version on Ruby <2.3
gem 'minitest', '5.11.3' if RUBY_VERSION < '2.3.0'
78 changes: 1 addition & 77 deletions features/fixtures/que/app/app.rb
Original file line number Diff line number Diff line change
@@ -1,79 +1,3 @@
require 'pg'
require 'que'
require 'socket'
require 'bugsnag'
require 'active_record'
require_relative "setup-que"

QUE_VERSION = ENV.fetch("QUE_VERSION")

Bugsnag.configure do |config|
puts "Configuring `api_key` to #{ENV['BUGSNAG_API_KEY']}"
config.api_key = ENV['BUGSNAG_API_KEY']
puts "Configuring `endpoint` to #{ENV['BUGSNAG_ENDPOINT']}"
config.endpoint = ENV['BUGSNAG_ENDPOINT']
end

postgres_ready = false
attempts = 0
MAX_ATTEMPTS = 10

until postgres_ready || attempts >= MAX_ATTEMPTS
begin
Timeout::timeout(5) { TCPSocket.new('postgres', 5432).close }

postgres_ready = true
rescue Exception
attempts += 1
sleep 1
end
end

raise 'postgres was not ready in time!' unless postgres_ready

ActiveRecord::Base.establish_connection(
adapter: 'postgresql',
database: 'postgres',
username: 'postgres',
password: 'test_password',
host: 'postgres'
)

Que.connection = ActiveRecord
Que.migrate!(version: Que::Migrations::CURRENT_VERSION)

# Workaround a bug in que/pg
# see https://github.com/que-rb/que/issues/247
if QUE_VERSION == '0.14'
Que::Adapters::Base::CAST_PROCS[1184] = lambda do |value|
case value
when Time then value
when String then Time.parse(value)
else raise "Unexpected time class: #{value.class} (#{value.inspect})"
end
end
end

class UnhandledJob < Que::Job
def run
raise RuntimeError.new("Unhandled error")
end

def handle_error(error)
destroy
end
end

class HandledJob < Que::Job
def run
raise RuntimeError.new("Handled error")
rescue => exception
Bugsnag.notify(exception)
end
end

case ARGV[0]
when "unhandled"
UnhandledJob.enqueue
when "handled"
HandledJob.enqueue
end
22 changes: 22 additions & 0 deletions features/fixtures/que/app/enqueue-job.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require_relative "setup-que"

query = <<-SQL
SELECT EXISTS (
SELECT FROM pg_tables WHERE tablename = 'que_jobs'
) AS que_jobs_exists
SQL

Timeout::timeout(10) do
loop do
break if $connection.exec(query)[0]["que_jobs_exists"] == "t"

sleep 0.1
end
end

case ARGV[0]
when "unhandled"
UnhandledJob.enqueue
when "handled"
HandledJob.enqueue
end
71 changes: 71 additions & 0 deletions features/fixtures/que/app/setup-que.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
require 'pg'
require 'que'
require 'socket'
require 'bugsnag'

QUE_VERSION = ENV.fetch("QUE_VERSION")

Bugsnag.configure do |config|
puts "Configuring `api_key` to #{ENV['BUGSNAG_API_KEY']}"
config.api_key = ENV['BUGSNAG_API_KEY']
puts "Configuring `endpoint` to #{ENV['BUGSNAG_ENDPOINT']}"
config.endpoint = ENV['BUGSNAG_ENDPOINT']
end

postgres_ready = false
attempts = 0
MAX_ATTEMPTS = 10

until postgres_ready || attempts >= MAX_ATTEMPTS
begin
Timeout::timeout(5) { TCPSocket.new('postgres', 5432).close }

postgres_ready = true
rescue Exception
attempts += 1
sleep 1
end
end

raise 'postgres was not ready in time!' unless postgres_ready

$connection = PG::Connection.open(
host: 'postgres',
user: 'postgres',
password: 'test_password',
dbname: 'postgres'
)

if QUE_VERSION == '0.14'
Que.connection = $connection

# Workaround a bug in que/pg
# see https://github.com/que-rb/que/issues/247
Que::Adapters::Base::CAST_PROCS[1184] = lambda do |value|
case value
when Time then value
when String then Time.parse(value)
else raise "Unexpected time class: #{value.class} (#{value.inspect})"
end
end
else
Que.connection_proc = ->(&block) { block.call($connection) }
end

class UnhandledJob < Que::Job
def run
raise RuntimeError.new("Unhandled error")
end

def handle_error(error)
destroy
end
end

class HandledJob < Que::Job
def run
raise RuntimeError.new("Handled error")
rescue => exception
Bugsnag.notify(exception)
end
end
3 changes: 3 additions & 0 deletions features/fixtures/rails3/app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ gem "warden"

# Install a compatible Loofah version on Ruby <2.5
gem 'loofah', '2.20.0' if RUBY_VERSION < '2.5'

# Install a compatible Thor version on Ruby <2.6
gem 'thor', '<1.3.0' if RUBY_VERSION < '2.6'
3 changes: 2 additions & 1 deletion features/fixtures/rails7/app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ gem "rails", "~> 7.0.1"
gem "sprockets-rails"

# Use sqlite3 as the database for Active Record
gem "sqlite3", "~> 1.4"
# Install a compatible sqlite version on Ruby <3.0
gem "sqlite3", RUBY_VERSION >= '3.0' ? "~> 1.7" : "< 1.7"

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
Expand Down
11 changes: 11 additions & 0 deletions features/fixtures/rails_integrations/app/config/application.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# reproduce #803 by setting Resque's backend to 'Multiple' before our Resque
# integration runs
# see https://github.com/bugsnag/bugsnag-ruby/pull/803
require "resque"
require "resque/failure/redis"
require "resque/failure/multiple"

Resque::Failure::Multiple.classes = [Resque::Failure::Redis]
Resque::Failure.backend = Resque::Failure::Multiple
# end #803 reproduction

require_relative 'boot'

require "rails"
Expand Down
Loading
Loading