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: handleSwitchRouteSet builds timeline with stale studio routeSets #1291

Draft
wants to merge 3 commits into
base: release52
Choose a base branch
from

Conversation

Julusian
Copy link
Member

About the Contributor

This pull request is posted on behalf of the BBC

Type of Contribution

This is a: Bug fix

New Behavior

This fixes a flaw in #1285

My testing showed that it was updating the timeline, and the routeset was toggling, but I didn't notice that the active value for the routeset was always one update behind.

This is because studioPlayoutModel.switchRouteSet would store the pending changes on the studioPlayoutModel. Then later when building the timeline, it was fetching the DBStudio off the context. Ignoring that there might be some changes performed earlier in the job that might want to be used.

This change changes this, so that the changes are instead stored inside the context. This means that after calling switchRouteSet any fetches of the studio from the context will reflect the updated but not yet saved values.

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

Time Frame

Other Information

This also does some refactoring to split up a file. To make review easier, read each commit separately

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.

@Julusian Julusian requested a review from a team as a code owner October 17, 2024 15:59
@Julusian Julusian changed the title chore: split job-worker context.ts into multiple files fix: handleSwitchRouteSet builds timeline with stale studio routeSets Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 97.58065% with 3 lines in your changes missing coverage. Please review.

Project coverage is 60.71%. Comparing base (132ebc0) to head (082b1d8).
Report is 2 commits behind head on release52.

Files with missing lines Patch % Lines
...c/playout/model/implementation/PlayoutModelImpl.ts 50.00% 1 Missing ⚠️
...ob-worker/src/studio/model/StudioBaselineHelper.ts 0.00% 1 Missing ⚠️
...-worker/src/studio/model/StudioPlayoutModelImpl.ts 83.33% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           release52    #1291      +/-   ##
=============================================
+ Coverage      60.63%   60.71%   +0.08%     
=============================================
  Files            459      460       +1     
  Lines          78598    78634      +36     
  Branches        4961     4926      -35     
=============================================
+ Hits           47655    47746      +91     
- Misses         30729    30773      +44     
+ Partials         214      115      -99     

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

@Julusian Julusian marked this pull request as draft October 17, 2024 16:34
@Julusian Julusian added the Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution from BBC Contributions sponsored by BBC (bbc.co.uk)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant