Ensure Rails testing is considered a development environment#3062
Merged
Conversation
marcotc
force-pushed
the
rails-test-detect
branch
from
August 28, 2023 22:19
045eb21 to
3997a09
Compare
marcotc
force-pushed
the
rails-test-detect
branch
from
August 28, 2023 22:22
3997a09 to
f89f2f3
Compare
anmarchenko
approved these changes
Sep 19, 2023
anmarchenko
left a comment
Member
There was a problem hiding this comment.
I think we need to go forward with that because there are still issues with telemetry and RC being reported.
Do you think we would need to add a check for Cucumber in test? method?
marcotc
marked this pull request as ready for review
September 19, 2023 20:10
Member
Author
That's a good idea, I'll open a separate PR. |
Codecov Report
@@ Coverage Diff @@
## master #3062 +/- ##
=======================================
Coverage 98.16% 98.16%
=======================================
Files 1283 1283
Lines 73898 73918 +20
Branches 3421 3421
=======================================
+ Hits 72542 72565 +23
+ Misses 1356 1353 -3
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This file contains hidden or 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
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.
What does this PR do?
This PR detects if a Rails application is running in
developmentortestmode, and uses this information to informddtraceinternally in order improve logging and background worker management.Motivation
Currently, we consider local development Rails console as a production environment, which is incorrect.
Additional Notes
This checking ensures
staging, which is a common non-stardard Rails environment is considered "not development" byddtrace.How to test the change?
There are unit test covering this change.