-
Notifications
You must be signed in to change notification settings - Fork 598
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
Enable defer_rails_initialization config by environment variable only #1791
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configs are loaded during initialization. This fix was placed behind a feature flag referencing the config value, but that value will always be falsey at initialization, so the bugfix was unreachable. Environment variables are accessible before initialization. The environment variable NEW_RELIC_DEFER_RAILS_INITIALIZATION may be set to true to enable this option.
tannalynn
reviewed
Feb 13, 2023
skip unless defined?(Rails::VERSION) | ||
# TODO: This test passes in a Rails console in a playground app and in the customer's environment | ||
# but fails in this unit test context | ||
skip if Gem::Version.new(NewRelic::VERSION::STRING) >= Gem::Version.new('8.13.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was removed because
- it has never worked and was always being skipped
- it is not possible for this test to work because the rails instrumentation is loaded prior to any tests running in the env tests, therefore configuration options that are used while loading instrumentation cannot be changed and tested in this way. This would have be changed to be tested in a multiverse situation.
fallwith
reviewed
Feb 13, 2023
Co-authored-by: James Bunch <fallwith@gmail.com>
SimpleCov Report
|
fallwith
approved these changes
Feb 13, 2023
This was referenced Feb 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Configs are loaded during initialization. This fix was placed behind a feature flag referencing the config value, but that value will always be
false
at initialization, so the bug fix was unreachable.Environment variables are accessible before initialization. The environment variable
NEW_RELIC_DEFER_RAILS_INITIALIZATION
may be set to true to enable this option.Resolves #662 #1800
Todo: