8000 feat: meteor 2.16 by Julusian · Pull Request #1308 · Sofie-Automation/sofie-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: meteor 2.16 #1308

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

Merged
merged 2 commits into from
Dec 10, 2024
Merged

Conversation

Julusian
Copy link
Contributor
@Julusian Julusian commented Oct 31, 2024

About the Contributor

This pull request is posted on behalf of the BBC

Type of Contribution

This is a: Feature / Tech stack update

New Behavior

This updates meteor to 2.16 and replaces existing uses of mongo collection observe and observeChanges methods with observeAsync and observeChangesAsync.
These changes are not necessary for 2.16, but are preperation for meteor 3.0 that is possible to do in 2.16

A couple of uses of waitForPromise have been replaced with native promises.

This also fixes some concerns I have with some of the *Observer classes. I have concerns about leaks if they are in the middle of executing while stop() is called, to mitigate this I have given each of them a #disposed property which allows various callbacks to know they have been disposed and make sure they don't semi-restart themselves after stop() is called.
The most visible scenario of this is StudioObserver, where if stop was called while its RundownsObserver was being reconstructed, then that RundownsObserver would be leaked.

There was also an issue with some of the debounces, where there could be concurrent executions of them in different fibers if the execution took longer than the debounce time. A new helper has been written and used to mitigate this PromiseDebounce.

I suspect there were also other places of potential leaks, when multiple mongo observers were setup and if one of them threw and error the ones which succeeded would be leaked. The waitForAllObserversReady handler has been added to handle this safely.

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

The publications themselves don't have any test coverage, but tests have been added for newly added helper code.

I have done some testing with light usage of Sofie, using playout-gateway, package-manager and input-gateway and haven't noticed anything wrong. More extensive testing will be performed, but I think that an important part of that is to put it in front of devs while working on other features.

Affected areas

This PR affects the publications in general.

Time Frame

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.

@Julusian Julusian requested a review from a team as a code owner October 31, 2024 13:04
Copy link
codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 49.60106% with 379 lines in your changes missing coverage. Please review.

Project coverage is 60.76%. Comparing base (3b4cdda) to head (c593560).
Report is 153 commits behind head on release52.

Files with missing lines Patch % Lines
...eContentStatusUI/rundown/rundownContentObserver.ts 0.00% 62 Missing ⚠️
...eceContentStatusUI/bucket/bucketContentObserver.ts 0.00% 50 Missing ⚠️
...packageManager/expectedPackages/contentObserver.ts 0.00% 42 Missing ⚠️
...erver/api/deviceTriggers/RundownContentObserver.ts 17.14% 29 Missing ⚠️
...ver/publications/partsUI/rundownContentObserver.ts 0.00% 18 Missing ⚠️
meteor/server/api/studio/api.ts 0.00% 17 Missing ⚠️
...ications/partInstancesUI/rundownContentObserver.ts 0.00% 15 Missing ⚠️
meteor/server/api/ingest/rundownInput.ts 43.47% 13 Missing ⚠️
meteor/server/api/ExternalMessageQueue.ts 14.28% 12 Missing ⚠️
...teor/server/api/deviceTriggers/RundownsObserver.ts 67.56% 12 Missing ⚠️
... and 35 more
Additional details and impacted files
@@              Coverage Diff              @@
##           release52    #1308      +/-   ##
=============================================
+ Coverage      60.38%   60.76%   +0.38%     
=============================================
  Files            461      461              
  Lines          79547    79083     -464     
  Branches        5057     5029      -28     
=============================================
+ Hits           48033    48055      +22     
+ Misses         31258    30886     -372     
+ Partials         256      142     -114     

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

@Julusian Julusian added the Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) label Oct 31, 2024
@nytamin nytamin merged commit c593560 into Sofie-Automation:release52 Dec 10, 2024
45 of 46 checks passed
@Julusian Julusian deleted the upstream/meteor2.16 branch December 10, 2024 14:31
@nytamin nytamin mentioned this pull request Dec 16, 2024
4 tasks
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)
Development

Successfully merging this pull request may close these issues.

2 participants
0