Skip to content
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 metrics borking module load in worker #3941

Merged

Conversation

gthb
Copy link
Contributor

@gthb gthb commented Aug 31, 2021

Minimal fix for #3934

Added a test case exercising this fix.

Test case sidenote 1: I noticed state bleeding between test cases. If this new test case is placed after the existing initializes trackers when not on node and... case, then it fails because that existing test case adds properties onto the global object and leaves them there. It should clean up, but I've not tried to address this.

Test case sidenote 2: when I remove my fix to verify that the new test case fails, then actually the whole test suite fails to run because the expect library borks on process being falsy --- despite the process backup having been put back onto the global object before expect is called. This must be some jest execution reordering black magic and I have not tried to troubleshoot it.

Tested manually that this fixes the problem in my setup.

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

@gthb gthb requested a review from kamilogorek as a code owner August 31, 2021 11:04
@gthb gthb force-pushed the fix-metrics-borking-module-load-in-worker branch from 0f07e89 to 01a267a Compare August 31, 2021 11:07
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

Test case sidenote 1: I noticed state bleeding between test cases. If this new test case is placed after the existing initializes trackers when not on node and... case, then it fails because that existing test case adds properties onto the global object and leaves them there. It should clean up, but I've not tried to address this.

@onurtemizkan Could you take a look at this and investigate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants