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: Hold mode doesn't work at all (SOFIE-3661) #1352

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

jstarpl
Copy link
Member

@jstarpl jstarpl commented Dec 19, 2024

About the Contributor

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a:

Bug fix

Current Behavior

Hold mode didn't work at all because it would go straight from pending to Completed without modifying the Hold-TO PartInstance. Also, timeline wasn't updated when Hold was being Completed.

New Behavior

The PENDING -> ACTIVE -> COMPLETED cycle is wholly handled inside the take job in job-worker. The misleading code that would switch the Hold state inside cycleSelectedPartInstances has been removed and a new method, resetHoldState has been added to handle the situation of an auto-take happening while Hold is enabled. Inner functions for Hold have been renamed to reflect what they were doing.

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 Hold logic.

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 December 19, 2024 09:55
@jstarpl jstarpl changed the title fix: HOLD mode doesn't work at all fix: HOLD mode doesn't work at all (SOFIE-3661) Dec 19, 2024
@jstarpl jstarpl changed the title fix: HOLD mode doesn't work at all (SOFIE-3661) fix: Hold mode doesn't work at all (SOFIE-3661) Dec 19, 2024
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 58.00%. Comparing base (d2a3cdf) to head (a7d6999).

Files with missing lines Patch % Lines
packages/job-worker/src/playout/take.ts 72.09% 12 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           release51    #1352      +/-   ##
=============================================
+ Coverage      57.96%   58.00%   +0.04%     
=============================================
  Files            525      525              
  Lines          85164    85165       +1     
  Branches        4428     4451      +23     
=============================================
+ Hits           49362    49403      +41     
+ Misses         35798    35728      -70     
- Partials           4       34      +30     

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

Copy link
Contributor

@tsorbo tsorbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix has been successfully tested in RK5.

@jstarpl jstarpl merged commit 988274d into release51 Jan 7, 2025
79 of 81 checks passed
@jstarpl jstarpl deleted the fix/sofie-3661/broken-hold branch January 7, 2025 09:57
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