-
Notifications
You must be signed in to change notification settings - Fork 306
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
[ci-visibility] Remove usage of .asyncResource
in mocha plugin
#4348
[ci-visibility] Remove usage of .asyncResource
in mocha plugin
#4348
Conversation
Overall package sizeSelf size: 6.51 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
BenchmarksBenchmark execution time: 2024-05-24 11:13:42 Comparing candidate commit 6a48c03 in PR branch Found 2 performance improvements and 0 performance regressions! Performance is the same for 256 metrics, 8 unstable metrics. scenario:plugin-graphql-with-depth-and-collapse-on-18
scenario:plugin-graphql-with-depth-on-max-18
|
@@ -469,7 +469,7 @@ addHook({ | |||
// Used to start and finish test session and test module | |||
addHook({ | |||
name: 'mocha', | |||
versions: ['>=8.0.0'], | |||
versions: ['>=5.2.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.
just a confirmation, you're making the version support lower than it was before (it's usually not a common thing so i'm just pointing it out)
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.
oh yeah, I should've mentioned this. This file is not there for <8 so this should be a noop. I changed it because the testing matrix became way more complicated. We should probably fix our testing setup but that's for another PR 😄
What does this PR do?
Remove the usage of
.asyncResource
to check if a function has been wrapped already. Now we'll use anotherWeakSet
wrappedFunctions
to check whether the function is wrapped.I've additionally fixed the plugin tests for mocha, which were not running since the merge of #4314, as seen by this GHA: https://github.com/DataDog/dd-trace-js/actions/runs/9218422124/job/25361943902
It was not running because the instrumentation was split in three files and our test setup didn't allow for that.
After this change, they're running: https://github.com/DataDog/dd-trace-js/actions/runs/9222873007/job/25374958036?pr=4348
Motivation
It's deprecated: nodejs/node#46432
Plugin Checklist
No extra unit tests needed: just check that the ones we have are running and passing.