Comments (11)
cc @sidane, @aseroff, @thestelz v9.10.1 is now available with the fix
from newrelic-ruby-agent.
@dorner @juno @marlo-longley Version v9.10.1 of the New Relic Ruby agent has now been released to RubyGems.org. All bootstrap users should now able to upgrade past v9.9.0 by going with v9.10.1. Thanks again!
from newrelic-ruby-agent.
Is it possible that there is some conflict with the bootstrap
gem? We have that in our Gemfile. I'm wondering if a require "bootstrap"
is somehow getting confused and grabbing your file.
I don't see any instance of load
or require
that seems to be working on individual files inside gems.
Btw this is an open source / non-profit application, so you are free to clone it yourself! https://github.com/rubyforgood/human-essentials/
from newrelic-ruby-agent.
Ah, thanks, @dorner. Having bootstrap
listed in Gemfile
does indeed seem necessary to reproduce the problem. We can repro now.
My hypothesis: the New Relic gem's lib/
dir and the bootstrap
gem's lib/
dir are both in the Ruby lib path and when require 'bootstrap'
is performed, Ruby is finding our lib/bootstrap.rb
file first and hitting our file's exit
.
We'll work on a fix that could involve renaming bootstrap.rb
, relocating it to anywhere but the root of lib
, silently returning instead of calling warn
and exit
, or a combination of these.
For now, I consider v9.10 to have broken compatibility with the bootstrap
gem. Users of the bootstrap
gem will need to pin the New Relic Ruby agent v9.9 until we can publish a fix.
Thanks very much for reporting this and for your patience with us. And thanks so much for your Ruby for Good efforts.
from newrelic-ruby-agent.
@dorner I have created PR #2676 to fix the issue. It will need to be reviewed and approved by the other project maintainers before it can make its way into a new release.
If you would like to test the fix prior to it making its way out into a published gem release, you can reference this repo's "bootstrap" branch like so:
# Gemfile
gem 'newrelic_rpm',
github: 'newrelic/newrelic-ruby-agent',
branch: 'bootstrap'
You are of course welcome to simply stay on agent v9.9.0 if you'd prefer.
Either way, we'll be sure to post an update here once the fix makes its way out to RubyGems.
Thanks again for the bug report!
from newrelic-ruby-agent.
@fallwith
Just FYI.
My project faced with the same situation as dorner's, and it solved with your bootstrap
branch.
Thank you for quick fix!
Also, Thank you for reporting this, @dorner . 👏
from newrelic-ruby-agent.
https://new-relic.atlassian.net/browse/NR-276398
from newrelic-ruby-agent.
Hi @dorner,
Sorry to hear that the new agent version is causing this problem. That bootstrap.rb
file is new in v9.10.0 and is meant only to be used with some experimental new use cases. And conversely it is designed to be invisible to all existing use cases (shouldn't be read or required by anything) and in fact will complain as you've seen if it was loaded in an unexpected way.
We didn't expect your use case to load bootstrap.rb
, but somehow it was loaded.
From looking at your failed run, it looks like that job only does 2 things:
bundle exec rake db:create
bundle exec rake db:schema:load
Using a Rails v7.1 based app, I bundled the New Relic Ruby agent v9.10 and performed those commands and didn't see the same problem. I tried both with a non-existent database that needed to be created and against an existing database.
Is it possible that your app is engaging some other code when those rake
tasks are performed? Are you aware of anything that might be globbing up all .rb
files and calling load
or require
on them?
We will keep investigating regardless, but if you could provide us with some reproduction steps that would be helpful. Perhaps the steps could start with rails new
and go from there.
If we need to, we can rework bootstrap.rb
to not perform exit
, but we'd like to first better understand how you reached that line.
from newrelic-ruby-agent.
Amazing, thanks so much for the prompt response and fix!
from newrelic-ruby-agent.
The fix has been merged. We'll post another update here once a new release has been pushed to RubyGems.org.
from newrelic-ruby-agent.
Awesome!
from newrelic-ruby-agent.
Related Issues (20)
- Add Errors Inbox metadata configuration content to generated doc HOT 3
- [Spike] k8s & container integration HOT 1
- [Spike] Support FM/SA configuration HOT 1
- API driven noticed errors display as `expected: true`, and observed errors should too HOT 2
- Stripe integration Causes Cardinality Explosion HOT 6
- CI: address issues that stemmed from Rack hitting v3.1.x HOT 1
- CI: Investigate, address Grape v2.1 failures HOT 1
- Spike: Instrument `start_transaction.active_record` HOT 1
- Failed to get cluster name for elasticsearch during health check routine HOT 5
- Avoid deprecated Bundler method all_specs HOT 2
- Replace API key with access token in artifactory HOT 1
- [Spike] Agent2Query test definition discovery HOT 1
- Rails v8.0 / Browser Monitoring incompatibility - Rails has changed how it handles streamed renders HOT 1
- Update newrelic.yml generator with new security configs HOT 1
- Update `config.rake` with new Security configs HOT 2
- Create instrumentation for rdkafka HOT 1
- Create instrumentation for ruby-kafka HOT 1
- Create Kakfa service to use for both test apps HOT 1
- Create test app for rdkafka gem HOT 1
- Create test app using ruby-kafka HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from newrelic-ruby-agent.