-
Notifications
You must be signed in to change notification settings - Fork 375
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
Fix GraphQL patchers 'require' issue #3813
Conversation
Is it supported to load datadog first and graphql second, as well as the other way around? We already have tests like https://github.com/DataDog/dd-trace-rb/blob/master/spec/loading_spec.rb that start with a clean environment, given that this was a customer-reported issue I would consider adding a test that verifies that the reported case works correctly going forward. |
BenchmarksBenchmark execution time: 2024-08-05 18:32:43 Comparing candidate commit 6f6ce3e in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. |
497b58d
to
7891bba
Compare
Hello! Thanks for the suggestions. |
@@ -0,0 +1,31 @@ | |||
RSpec.describe 'loading graphql' do |
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.
I would think that adding require 'shellwords'
in this file is necessary so that it can be executed by itself? The only other place that requires this library is the top-level loading test that I can see.
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.
Thanks for the suggestion, I've added it !
6229289
to
6f6ce3e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3813 +/- ##
==========================================
- Coverage 97.87% 97.86% -0.01%
==========================================
Files 1262 1263 +1
Lines 75653 75738 +85
Branches 3710 3719 +9
==========================================
+ Hits 74044 74124 +80
- Misses 1609 1614 +5 ☔ View full report in Codecov by Sentry. |
What does this PR do?
Making a custom tracer based on unified_tracer should now not need to require explicitly the unified_tracer.rb file anymore. This also fixes the problem with currently unreleased appsec_tracer.
Motivation:
Fixes issue #3804
Additional Notes:
How to test the change?
Create a Rails + GraphQL app with a custom tracer that includes unified_tracer. GraphQL AppSec test app is using this so if system-tests passes, it works.
Unsure? Have a question? Request a review!