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: restore ALL data from snapshot, for debugging #1142

Closed nytamin closed 5 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: Feature

Current Behavior

When restoring a rundownPlaylist snapshot, only mediaObjects are restored, no other package-related data.

This is a problem when troubleshooting issues with packages, such as zebra stripes in the GUI.

New Behavior

Added a parameter to the restoreSnapshot method to allow the user to choose whether to only restore the rundownPlaylist, or also the studio-related data from the snapshot:

image

When uploading for debugging, the following additional data is restored:

When uploading normally, no additional data is restored.

Testing Instructions

Other Information

Status

codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (3ad0c73) 57.74% compared to head (2464744) 57.87%. Report is 53 commits behind head on release51.

Files Patch % Lines
meteor/server/api/snapshot.ts 8.24% 89 Missing :warning:
meteor/server/migration/1_50_0.ts 28.91% 59 Missing :warning:
...ations/packageManager/expectedPackages/generate.ts 0.00% 29 Missing :warning:
...job-worker/src/blueprints/context/OnTakeContext.ts 82.66% 26 Missing :warning:
...text/services/PartAndPieceInstanceActionService.ts 97.78% 12 Missing :warning:
meteor/server/publications/rundown.ts 0.00% 7 Missing :warning:
...ns/pieceContentStatusUI/rundown/regenerateItems.ts 0.00% 5 Missing :warning:
...s/server-core-integration/src/lib/subscriptions.ts 16.66% 5 Missing :warning:
...orker/src/blueprints/context/OnSetAsNextContext.ts 96.61% 4 Missing :warning:
.../job-worker/src/blueprints/context/adlibActions.ts 95.34% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release51 #1142 +/- ## ============================================= + Coverage 57.74% 57.87% +0.13% ============================================= Files 512 517 +5 Lines 82571 83238 +667 Branches 4307 4355 +48 ============================================= + Hits 47679 48178 +499 - Misses 34841 35008 +167 - Partials 51 52 +1 ```

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

ianshade commented 8 months ago

I would like to suggest one more thing that the option of restoring a Rundown Playlist snapshot for debugging could do, which is not deleting Playlist's activationId. It would be perfect for investigating issues where something went visibly wrong in the UI (or on the output) and the snapshot was taken while experiencing the issue (and while the Playlist was still active). It should probably be optional, and the UI should clearly state the consequences that restoring an active Playlist might have.