nrkno / sofie-core

Sofie Core: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
125 stars 38 forks source link

fix(core-integration): handle subscription error #1127

Closed nytamin closed 8 months ago

nytamin commented 8 months ago

About the Contributor

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a:

Bug fix

Current Behavior

When using core-integration (so gateways or other external applications):

const coreConnection = new CoreConnection(coreOptions)
await coreConnection.autoSubscribe('rundownPlaylists', myArguments)

If there is an error when subscribing (for example: a Match.test() throws, due to invalid arguments), the error is swallowed silently.

New Behavior

The error is now thrown.

Testing Instructions

Other Information

Status

codecov[bot] commented 8 months ago

Codecov Report

Attention: 405 lines in your changes are missing coverage. Please review.

Comparison is base (1b79d82) 47.77% compared to head (3ad0c73) 57.74%. Report is 46 commits behind head on release51.

Files Patch % Lines
...src/ingest/model/implementation/IngestModelImpl.ts 89.95% 67 Missing :warning:
meteor/server/migration/X_X_X.ts 35.64% 65 Missing :warning:
...nt/ui/util/useRundownAndShowStyleIdsForPlaylist.ts 0.00% 43 Missing :warning:
meteor/server/publications/rundown.ts 0.00% 32 Missing :warning:
...ackages/job-worker/src/ingest/ingestSegmentJobs.ts 35.71% 27 Missing :warning:
...src/ingest/model/implementation/LoadIngestModel.ts 82.14% 25 Missing :warning:
...gest/model/implementation/ExpectedPackagesStore.ts 87.16% 24 Missing :warning:
...job-worker/src/ingest/syncChangesToPartInstance.ts 42.85% 20 Missing :warning:
packages/corelib/src/playout/infinites.ts 5.55% 17 Missing :warning:
...est/model/implementation/IngestSegmentModelImpl.ts 93.01% 16 Missing :warning:
... and 17 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release51 #1127 +/- ## ============================================= + Coverage 47.77% 57.74% +9.97% ============================================= Files 390 512 +122 Lines 59643 82571 +22928 Branches 2521 4307 +1786 ============================================= + Hits 28492 47679 +19187 - Misses 31120 34841 +3721 - Partials 31 51 +20 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Julusian commented 8 months ago

Should this be targetting 51, or an older release?

nytamin commented 8 months ago

Should this be targetting 51, or an older release?

I'll cherry pick this fix onto r49 and r50 as well 👍