Skip to content

Commit

Permalink
Merge branch 'dev' into 2117_gemspec_test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle committed Jul 10, 2023
2 parents 7e524a2 + 98d02ca commit bdccfd4
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .build_ignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.github
.github/
.gitignore
.project
.rubocop.yml
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# New Relic Ruby Agent Release Notes

## dev

Version <dev> of the agent fixes `NewRelic::Agent.require_test_helper`.

- **Bugfix: Fix NewRelic::Agent.require_test_helper**

Version 9.3.0 of the agent made a change to the files distributed with the gem. This change unintentionally broke the `NewRelic::Agent.require_test_helper` API by removing the `test/agent_helper.rb` file. The file has been added back to the gem. This change also removes the `lib/new_relic/build.rb` file from the list because it is no longer created with our current release process.

Our thanks go to [@ajesler](https://github.com/ajesler) for reporting this issue and writing a test for the bug. [Issue#2113](https://github.com/newrelic/newrelic-ruby-agent/issues/2113), [PR#2115](https://github.com/newrelic/newrelic-ruby-agent/pull/2115), [Issue#2117](https://github.com/newrelic/newrelic-ruby-agent/issues/2117), [PR#2118](https://github.com/newrelic/newrelic-ruby-agent/pull/2118)

- **Source Documentation: update the Rack spec URL**

Community member [@olleolleolle](https://github.com/olleolleolle) noticed that our source code was referencing a now defunct URL for the Rack specification and submitted [PR#2121](https://github.com/newrelic/newrelic-ruby-agent/pull/2121) to update it. He also provided a terrific recommendation that we automate the checking of links to proactively catch defunct ones in future. Thanks, @olleolleolle!


## v9.3.0

Version 9.3.0 of the agent adds log-level filtering, adds custom attributes for log events, and updates instrumentation for Action Cable. It also provides fixes for how `Fiber` args are treated, Code-Level Metrics, unnecessary files being included in the gem, and `NewRelic::Agent::Logging::DecoratingFormatter#clear_tags!` being incorrectly private.
Expand Down
1 change: 1 addition & 0 deletions lib/new_relic/cli/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def self.run
extra = []
options = ARGV.options do |opts|
script_name = File.basename($0)
# TODO: MAJOR VERSION - remove newrelic_cmd, deprecated since version 2.13
if /newrelic_cmd$/.match?(script_name)
$stdout.puts "warning: the 'newrelic_cmd' script has been renamed 'newrelic'"
script_name = 'newrelic'
Expand Down
2 changes: 1 addition & 1 deletion lib/new_relic/rack/browser_monitoring.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def gather_source(response)
end

# Per "The Response > The Body" section of Rack spec, we should close
# if our response is able. http://rack.rubyforge.org/doc/SPEC.html
# if our response is able. https://github.com/rack/rack/blob/main/SPEC.rdoc
def close_old_response(response)
response.close if response.respond_to?(:close)
end
Expand Down
8 changes: 5 additions & 3 deletions newrelic_rpm.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Gem::Specification.new do |s|
https://github.com/newrelic/newrelic-ruby-agent/
EOS
s.email = '[email protected]'
# TODO: MAJOR VERSION - remove newrelic_cmd, deprecated since version 2.13
s.executables = %w[newrelic_cmd newrelic nrdebug]
s.extra_rdoc_files = [
'CHANGELOG.md',
Expand All @@ -40,11 +41,12 @@ Gem::Specification.new do |s|

reject_list = File.read('./.build_ignore').split("\n")
file_list = `git ls-files -z`.split("\x0").reject { |f| reject_list.any? { |rf| f.start_with?(rf) } }
build_file_path = 'lib/new_relic/build.rb'
file_list << build_file_path if File.exist?(build_file_path)
# test/agent_helper.rb is a requirement for the NewRelic::Agent.require_test_helper public API
test_helper_path = 'test/agent_helper.rb'
file_list << test_helper_path
s.files = file_list

s.homepage = 'https://github.com/newrelic/rpm'
s.homepage = 'https://github.com/newrelic/newrelic-ruby-agent'
s.require_paths = ['lib']
s.summary = 'New Relic Ruby Agent'
s.add_development_dependency 'bundler'
Expand Down
5 changes: 5 additions & 0 deletions test/multiverse/suites/infinite_tracing/Envfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

def grpc_version
RUBY_VERSION < '2.6.0' ? ", '1.49.1'" : ''
end

gemfile <<~RB
gem 'newrelic-infinite_tracing', :path => '../../../../infinite_tracing'
gem 'grpc'#{grpc_version}
RB

0 comments on commit bdccfd4

Please sign in to comment.