sofie-core icon indicating copy to clipboard operation
sofie-core copied to clipboard

fix: restore ALL data from snapshot, for debugging

Open nytamin opened this issue 1 year ago • 2 comments

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:

  • mediaObjects
  • expectedPackageWorkStatuses
  • packageContainerPackageStatuses
  • packageInfos

When uploading normally, no additional data is restored.

Testing Instructions

  • Just test that restoring of snapshots still work

Other Information

Status

  • [x] PR is ready to be reviewed.
  • [x] The functionality has been tested by the author.
  • [ ] Relevant unit tests has been added / updated.
  • [ ] Relevant documentation (code comments, system documentation) has been added / updated.

nytamin avatar Feb 06 '24 15:02 nytamin

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
@@              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.

codecov[bot] avatar Feb 06 '24 15:02 codecov[bot]

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.

ianshade avatar Feb 07 '24 09:02 ianshade