Skip to content

fix: converting pieces to infinites and modifying them#1614

Open
ianshade wants to merge 4 commits intoSofie-Automation:mainfrom
tv2norge-collab:contribute/EAV-693
Open

fix: converting pieces to infinites and modifying them#1614
ianshade wants to merge 4 commits intoSofie-Automation:mainfrom
tv2norge-collab:contribute/EAV-693

Conversation

@ianshade
Copy link
Contributor

About the Contributor

This pull request is posted on behalf of TV 2 Norge.

Type of Contribution

This is a:

Bug fix (+removal of some arbitrary limitations)

Current Behavior

There were a few blockers when trying to dynamically convert pieces to infinites:

  1. onSetAsNext had an hardcoded check that threw an error if you tried to update a piece in the current part.
  2. Even if you bypassed that and changed a piece's lifespan to infinite via updatePieceInstance, the piece would disappear after the next take.
  3. You couldn't update an infinite piece continuation in the current part if it originated from a previous part.

New Behavior

  1. Removed current part restriction: Blueprints can now call updatePieceInstance for pieces in the current part from onSetAsNext.
  2. Auto-initialize infinite properties: When lifespan is updated to anything other than WithinPart, PlayoutPieceInstanceModel now runs setupPieceInstanceInfiniteProperties.
  3. Tracking conversion: Added dynamicallyConvertedToInfinite to the PieceInstance model to allow getPlayheadTrackingInfinitesForPart to correctly identify and persist these pieces.
  4. Current part continuation updates: Relaxed the check in PartAndPieceInstanceActionService so that infinite continuations can be updated as long as they belong to the current part instance.

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

  • Playout logic (infinite piece tracking and continuation).
  • Blueprint API / onSetAsNext context.

Time Frame

Other Information

Status

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

… in the current part

it was an artificial limitation
those pieces are not recreated by `syncInfinitesForNextPartInstance` as previously believed
@ianshade ianshade requested a review from a team as a code owner January 24, 2026 07:46
@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

Warning

Rate limit exceeded

@PeterC89 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 26 minutes and 6 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ianshade ianshade added the Contribution from TV 2 Norge Contributions sponsored by TV 2 Norge (tv2.no) label Jan 24, 2026
@codecov
Copy link

codecov bot commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@PeterC89
Copy link
Contributor

Very excited about this, would save a lot of copying work that we currently do in onSetAsNext

@PeterC89
Copy link
Contributor

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@PeterC89 PeterC89 changed the base branch from release53 to main February 4, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution from TV 2 Norge Contributions sponsored by TV 2 Norge (tv2.no)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants