nrkno / sofie-core

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

fix: improve logging of error in handleUpdatedPackageInfoForRundown i… #1218

Open nytamin opened 1 week ago

nytamin commented 1 week ago

About the Contributor

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a: Bug fix

Current Behavior

In prod, we experience this error:

Ingest job "packageInfosUpdated" errored: An internal error occured!
Error: onUpdatedPackageInfoForRundown called but ingestData is undefined, Error: onUpdatedPackageInfoForRundown called but ingestData is undefined
    at /opt/core/programs/server/npm/node_modules/@sofie-automation/job-worker/dist/ingest/packageInfo.js:32:19
    at /opt/core/programs/server/npm/node_modules/@sofie-automation/job-worker/dist/ingest/lock.js:36:38
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async runWithRundownLockInner (/opt/core/programs/server/npm/node_modules/@sofie-automation/job-worker/dist/ingest/lock.js:110:21)
    at async IngestWorkerChild.runJob (/opt/core/programs/server/npm/node_modules/@sofie-automation/job-worker/dist/workers/ingest/child.js:88:33)

New Behavior

The actual cause of the error is unknown, this is an attempt to rule out orphaned rundowns and provide some more info for future troubleshooting.

Testing

Affected areas

This PR affects rundown data ingest.

Time Frame

Other Information

Status

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 16.66667% with 10 lines in your changes missing coverage. Please review.

Project coverage is 57.93%. Comparing base (931a430) to head (2aa28c7).

Files Patch % Lines
meteor/server/api/ingest/packageInfo.ts 0.00% 8 Missing :warning:
packages/job-worker/src/ingest/lock.ts 50.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## feat/R51-live-status-gateway-on-R50 #1218 +/- ## ======================================================================= - Coverage 57.95% 57.93% -0.02% ======================================================================= Files 485 485 Lines 79845 79854 +9 Branches 4140 3648 -492 ======================================================================= - Hits 46276 46267 -9 - Misses 33532 33550 +18 Partials 37 37 ```

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