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: Ensure drain target is a valid event emitter before subscribing #1167

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

metal-messiah
Copy link
Member

Ensure that the drain target is a valid event emitter to ensure that the .on method exists and will not throw errors.

Overview

Related Issue(s)

https://newrelic.slack.com/archives/C0193KAHHAS/p1724879485394419

Testing

New unit test has been added to validate the behavior

Copy link

github-actions bot commented Aug 29, 2024

Asset Size Report

Merging this pull request will result in the following asset size changes:

Agent Asset Previous Size New Size Diff
lite loader 32.66 kB / 11.35 kB (gzip) 32.71 kB / 11.37 kB (gzip) 0.16% / 0.16% (gzip)
lite async-chunk 50.83 kB / 16.35 kB (gzip) 50.83 kB / 16.35 kB (gzip) 0% / 0% (gzip)
pro loader 53.86 kB / 18.05 kB (gzip) 53.91 kB / 18.07 kB (gzip) 0.09% / 0.07% (gzip)
pro async-chunk 99.3 kB / 29.69 kB (gzip) 99.3 kB / 29.69 kB (gzip) 0% / 0% (gzip)
spa loader 61.79 kB / 20.5 kB (gzip) 61.84 kB / 20.51 kB (gzip) 0.08% / 0.07% (gzip)
spa async-chunk 114.44 kB / 34.03 kB (gzip) 114.44 kB / 34.03 kB (gzip) 0% / 0% (gzip)

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.70%. Comparing base (84bd299) to head (b298dcb).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1167      +/-   ##
==========================================
- Coverage   88.82%   88.70%   -0.12%     
==========================================
  Files         161      161              
  Lines        7357     7359       +2     
  Branches     1457     1459       +2     
==========================================
- Hits         6535     6528       -7     
- Misses        704      712       +8     
- Partials      118      119       +1     
Flag Coverage Δ
integration-tests 91.78% <100.00%> (-0.26%) ⬇️
unit-tests 78.76% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Aug 29, 2024

Static Badge

Last ran on August 29, 2024 09:55:52 CDT
Checking merge of (b298dcb) into main (84bd299)

@metal-messiah metal-messiah changed the title fix: Ensure drain target is a valid event emitter before adding subscription fix: Ensure drain target is a valid event emitter before subscribing Aug 29, 2024
@metal-messiah metal-messiah merged commit 187d31f into main Aug 29, 2024
32 of 35 checks passed
@metal-messiah metal-messiah deleted the ensure-on branch August 29, 2024 16:06
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