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(Core/Publications/Device Triggers): Device Action Studio Context gets lost, Adlib previews are unstable (SOFIE-3638) #1334

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

jstarpl
Copy link
Member

@jstarpl jstarpl commented Nov 29, 2024

About the Contributor

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a:

Bug fix

Current Behavior

Given a specific set of conditions and user actions, Sofie Core log starts showing Undefined Device Trigger context for studio, and Device Trigger actions stop working until a reactivation/rundown reload. Also, some AdLib previews would "go away" during Rundown Activation/Reactivation, leaving these buttons "blank" in Input Gateway.

New Behavior

Device Trigger Actions publications were rebuilt using the Collections promise API, solving the described problem. The root of the problem was that Fibers were getting in the way and making code that was assumed to work in sequence work in parallel. By employing Promises, much of the code has been parallelized, resulting in - what feels like - a very consistent experience at the Input Gateway level.

Testing

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Affected areas

  • This PR affects the Device Action Triggers publications feature

Time Frame

This Bug Fix is critical for us, please review and merge it as soon as possible.

Other Information

Status

  • PR is ready to be reviewed.
  • 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.

@jstarpl jstarpl requested a review from a team as a code owner November 29, 2024 15:49
@jstarpl jstarpl changed the base branch from master to release51 November 29, 2024 15:50
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 6.66667% with 210 lines in your changes missing coverage. Please review.

Project coverage is 57.98%. Comparing base (8bded15) to head (193815d).
Report is 49 commits behind head on release51.

Files with missing lines Patch % Lines
...r/api/deviceTriggers/StudioDeviceTriggerManager.ts 2.02% 145 Missing ⚠️
...server/publications/lib/ReactiveCacheCollection.ts 20.40% 39 Missing ⚠️
meteor/server/api/deviceTriggers/observer.ts 0.00% 22 Missing ⚠️
...erver/api/deviceTriggers/RundownContentObserver.ts 33.33% 4 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           release51    #1334      +/-   ##
=============================================
+ Coverage      57.90%   57.98%   +0.07%     
=============================================
  Files            526      525       -1     
  Lines          84973    85164     +191     
  Branches        4394     4433      +39     
=============================================
+ Hits           49207    49384     +177     
- Misses         35740    35747       +7     
- Partials          26       33       +7     

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

@jstarpl jstarpl changed the title fix: Device Action Studio Context gets lost, Adlib previews are unstable fix(Core/Publications/Device Triggers): Device Action Studio Context gets lost, Adlib previews are unstable Nov 29, 2024
@jstarpl jstarpl changed the title fix(Core/Publications/Device Triggers): Device Action Studio Context gets lost, Adlib previews are unstable fix(Core/Publications/Device Triggers): Device Action Studio Context gets lost, Adlib previews are unstable (SOFIE-3638) Nov 29, 2024
@jstarpl jstarpl merged commit 1478b68 into release51 Dec 4, 2024
77 of 80 checks passed
@jstarpl jstarpl deleted the fix/sofie-3638/device-action-context-lost branch December 4, 2024 10: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