From 665cbb68addadc2950feed4f33b0c4ad0dd67a79 Mon Sep 17 00:00:00 2001 From: Kayla Reopelle Date: Wed, 5 Jul 2023 09:39:48 -0700 Subject: [PATCH 1/2] Include `test/agent_helper.rb` in build The test/agent_helper.rb file was overlooked in our switch to the new file inclusion process introduced in PR#2089 https://github.com/newrelic/newrelic-ruby-agent/pull/2089 This file is required for the public API NewRelic::Agent.require_test_helper. Furthermore, build.rb was still included. This file used to be generated with Jenkins during our release process and has not been created with a release since version 6.13.0. --- CHANGELOG.md | 10 ++++++++++ newrelic_rpm.gemspec | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb3c459ed8..586cb81082 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # New Relic Ruby Agent Release Notes +## dev + +Version 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. [Issue#2113](https://github.com/newrelic/newrelic-ruby-agent/issues/2113), [PR#TBD](tbd) + ## 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. diff --git a/newrelic_rpm.gemspec b/newrelic_rpm.gemspec index 27bd71556f..b3f1858d2b 100644 --- a/newrelic_rpm.gemspec +++ b/newrelic_rpm.gemspec @@ -40,8 +40,9 @@ 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' From 7d69da548ada9a8e226346d5f9d362d4a27032db Mon Sep 17 00:00:00 2001 From: "Kayla Reopelle (she/her)" <87386821+kaylareopelle@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:25:04 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 586cb81082..1225a83b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Version of the agent fixes `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. [Issue#2113](https://github.com/newrelic/newrelic-ruby-agent/issues/2113), [PR#TBD](tbd) + 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) ## v9.3.0