openai: make services entirely optional when initializing#3420
Conversation
Overall package sizeSelf size: 4.9 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report
@@ Coverage Diff @@
## master #3420 +/- ##
=======================================
Coverage 84.28% 84.28%
=======================================
Files 214 214
Lines 8402 8402
Branches 33 33
=======================================
Hits 7082 7082
Misses 1320 1320 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
8a4a4f1 to
ab0b604
Compare
ab0b604 to
2869e5d
Compare
BenchmarksBenchmark execution time: 2023-07-19 23:05:39 Comparing candidate commit 2869e5d in PR branch Found 0 performance improvements and 3 performance regressions! Performance is the same for 472 metrics, 17 unstable metrics. scenario:plugin-graphql-with-depth-and-collapse-on-18
scenario:plugin-graphql-with-depth-off-18
scenario:plugin-graphql-with-depth-on-max-18
|
| uses: ./.github/actions/testagent/logs | ||
| - uses: codecov/codecov-action@v2 | ||
|
|
||
| openai: |
There was a problem hiding this comment.
The tests weren't running in CI at all! I never noticed since I only pushed code if tests passed locally.
What does this PR do?
At a high level an application would require dd-trace but not initialize it, and then would require openai. When this happens all of the tracer configuration is missing and an error would be thrown when accessing a deeply-nested config value. So now there are a few checks to see if things are initialized. If so, continue as usual. If not, load noop classes since tracing won't work right without initialization anyway.
Motivation