Skip to content

Conversation

@Julusian
Copy link
Member

About the Contributor

This pull request is posted on behalf of NRK.

Type of Contribution

This is a: Code improvement / Documentation improvement

Current Behavior

Media manager has been deprecated/unsupported since R50. The repository was archived and was labelled as will no longer operate without changes.

New Behavior

This removes any chunks of code I can find which are explicitly for media-manager.

As far as I can tell this should not affect the expected-playout-items (used by playout-gateway for viz).

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

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 August 25, 2025 11:54
@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 63.07692% with 24 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
meteor/server/migration/X_X_X.ts 34.37% 21 Missing ⚠️
meteor/server/api/ingest/debug.ts 0.00% 1 Missing ⚠️
meteor/server/lib/rest/v1/devices.ts 0.00% 1 Missing ⚠️
meteor/server/publications/peripheralDevice.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@nytamin nytamin left a comment

Choose a reason for hiding this comment

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

Looks good!

One note is that perhaps we should add a migration step to clear/drop the collections from the database?
I haven't tested it, but something like this perhaps?

import { MongoInternals } from 'meteor/mongo'
export const addSteps = addMigrationSteps(CURRENT_SYSTEM_VERSION, [
	{
		id: `Drop removed collections`,
		canBeRunAutomatically: true,
		validate: async () => {
			const existingCollections = await MongoInternals.defaultRemoteCollectionDriver().mongo.db.listCollections().toArray()
			const collectionsToDrop = existingCollections.filter(c => ['expectedMediaItems','mediaWorkFlows', 'mediaWorkFlowSteps'].includes(c.name))
			if (collectionsToDrop.length > 0) {
				return `There are ${collectionsToDrop.length} obsolete collections to be removed: ${collectionsToDrop.map(c => c.name).join(', ')}`
			}

			return false
		},
		migrate: async () => {
			const existingCollections = await MongoInternals.defaultRemoteCollectionDriver().mongo.db.listCollections().toArray()
			const collectionsToDrop = existingCollections.filter(c => ['expectedMediaItems','mediaWorkFlows', 'mediaWorkFlowSteps'].includes(c.name))
			for (const c of collectionsToDrop) {
				await MongoInternals.defaultRemoteCollectionDriver().mongo.db.dropCollection(c.name)
			}
		},
	}
])

@Julusian Julusian merged commit 76dfbd2 into Sofie-Automation:release53 Sep 2, 2025
32 checks passed
@Julusian Julusian deleted the feat/cleanup-media-manager-support branch September 2, 2025 11:19
jstarpl pushed a commit to nrkno/sofie-nrk-core that referenced this pull request Dec 12, 2025
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.

3 participants