Skip to content

Commit a18ae78

Browse files
committed
Merge branch 'bbc-release53' into upstream release53
1 parent 0923906 commit a18ae78

File tree

132 files changed

+4081
-1455
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+4081
-1455
lines changed

.github/workflows/node.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,16 +502,19 @@ jobs:
502502
- node-version: 22.x
503503
package-name: job-worker
504504
send-coverage: true
505-
# No tests for the gateways yet
505+
# No tests for some gateways yet
506506
# - node-version: 22.x
507507
# package-name: playout-gateway
508-
# - node-version: 22.x
509-
# package-name: mos-gateway
508+
# send-coverage: true
509+
- node-version: 22.x
510+
package-name: mos-gateway
511+
send-coverage: true
510512
- node-version: 22.x
511513
package-name: live-status-gateway
512514
send-coverage: true
513515
- node-version: 22.x
514516
package-name: webui
517+
send-coverage: true
515518
# manual meteor-lib as it only needs a couple of versions
516519
- node-version: 22.x
517520
package-name: meteor-lib

meteor/__mocks__/helpers/database.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ export async function setupMockShowStyleBlueprint(
476476
rundown,
477477
globalAdLibPieces: [],
478478
globalActions: [],
479+
globalPieces: [],
479480
baseline: { timelineObjects: [] },
480481
}
481482
},

meteor/server/api/deviceTriggers/TagsService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ import { PieceInstance } from '@sofie-automation/corelib/dist/dataModel/PieceIns
44
import { PieceInstanceFields, ContentCache } from './reactiveContentCacheForPieceInstances'
55
import { SourceLayers } from '@sofie-automation/corelib/dist/dataModel/ShowStyleBase'
66
import {
7+
createPartCurrentTimes,
78
PieceInstanceWithTimings,
89
processAndPrunePieceInstanceTimings,
910
} from '@sofie-automation/corelib/dist/playout/processAndPrune'
1011
import { applyAndValidateOverrides } from '@sofie-automation/corelib/dist/settings/objectWithOverrides'
1112
import { IWrappedAdLib } from '@sofie-automation/meteor-lib/dist/triggers/actionFilterChainCompilers'
1213
import { areSetsEqual, doSetsIntersect } from '@sofie-automation/corelib/dist/lib'
14+
import { getCurrentTime } from '../../lib/lib'
1315

1416
export class TagsService {
1517
protected onAirPiecesTags: Set<string> = new Set()
@@ -130,12 +132,11 @@ export class TagsService {
130132
): PieceInstanceWithTimings[] {
131133
// Approximate when 'now' is in the PartInstance, so that any adlibbed Pieces will be timed roughly correctly
132134
const partStarted = partInstanceTimings?.plannedStartedPlayback
133-
const nowInPart = partStarted === undefined ? 0 : Date.now() - partStarted
134135

135136
return processAndPrunePieceInstanceTimings(
136137
sourceLayers,
137138
pieceInstances as PieceInstance[],
138-
nowInPart,
139+
createPartCurrentTimes(getCurrentTime(), partStarted),
139140
false,
140141
false
141142
)

meteor/server/api/ingest/packageInfo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export async function onUpdatedPackageInfo(packageId: ExpectedPackageId, _doc: P
3535
case ExpectedPackageDBType.ADLIB_ACTION:
3636
case ExpectedPackageDBType.BASELINE_ADLIB_PIECE:
3737
case ExpectedPackageDBType.BASELINE_ADLIB_ACTION:
38+
case ExpectedPackageDBType.BASELINE_PIECE:
3839
case ExpectedPackageDBType.RUNDOWN_BASELINE_OBJECTS:
3940
onUpdatedPackageInfoForRundownDebounce(pkg)
4041
break

meteor/server/api/rest/v1/typeConversion.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ export function studioSettingsFrom(apiStudioSettings: APIStudioSettings): Comple
395395
enableBuckets: apiStudioSettings.enableBuckets ?? true, // Backwards compatible
396396
enableEvaluationForm: apiStudioSettings.enableEvaluationForm ?? true, // Backwards compatible
397397
mockPieceContentStatus: apiStudioSettings.mockPieceContentStatus,
398+
rundownGlobalPiecesPrepareTime: apiStudioSettings.rundownGlobalPiecesPrepareTime,
398399
}
399400
}
400401

@@ -421,6 +422,7 @@ export function APIStudioSettingsFrom(settings: IStudioSettings): Complete<APISt
421422
enableBuckets: settings.enableBuckets,
422423
enableEvaluationForm: settings.enableEvaluationForm,
423424
mockPieceContentStatus: settings.mockPieceContentStatus,
425+
rundownGlobalPiecesPrepareTime: settings.rundownGlobalPiecesPrepareTime,
424426
}
425427
}
426428

meteor/server/collections/collection.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ export interface AsyncOnlyReadOnlyMongoCollection<DBInterface extends { _id: Pro
234234
observeChanges(
235235
selector: MongoQuery<DBInterface> | DBInterface['_id'],
236236
callbacks: PromisifyCallbacks<ObserveChangesCallbacks<DBInterface>>,
237-
options?: Omit<FindOptions<DBInterface>, 'fields'>
237+
findOptions?: Omit<FindOptions<DBInterface>, 'fields'>,
238+
callbackOptions?: { nonMutatingCallbacks?: boolean | undefined }
238239
): Promise<Meteor.LiveQueryHandle>
239240

240241
/**

meteor/server/collections/implementations/asyncCollection.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ export class WrappedAsyncMongoCollection<DBInterface extends { _id: ProtectedStr
141141
async observeChanges(
142142
selector: MongoQuery<DBInterface> | DBInterface['_id'],
143143
callbacks: PromisifyCallbacks<ObserveChangesCallbacks<DBInterface>>,
144-
options?: FindOptions<DBInterface>
144+
findOptions?: FindOptions<DBInterface>,
145+
callbackOptions?: { nonMutatingCallbacks?: boolean | undefined }
145146
): Promise<Meteor.LiveQueryHandle> {
146147
const span = profiler.startSpan(`MongoCollection.${this.name}.observeChanges`)
147148
if (span) {
@@ -152,8 +153,8 @@ export class WrappedAsyncMongoCollection<DBInterface extends { _id: ProtectedStr
152153
}
153154
try {
154155
const res = await this._collection
155-
.find((selector ?? {}) as any, options as any)
156-
.observeChangesAsync(callbacks)
156+
.find((selector ?? {}) as any, findOptions as any)
157+
.observeChangesAsync(callbacks, callbackOptions)
157158
if (span) span.end()
158159
return res
159160
} catch (e) {

meteor/server/collections/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export const CoreSystem = createAsyncOnlyMongoCollection<ICoreSystem>(Collection
5959
'logo',
6060
'blueprintId',
6161
'settingsWithOverrides',
62+
'enableMonitorBlockedThread',
6263
])
6364
},
6465
})

meteor/server/lib/rest/v1/studios.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,5 @@ export interface APIStudioSettings {
223223
enableBuckets?: boolean
224224
enableEvaluationForm?: boolean
225225
mockPieceContentStatus?: boolean
226+
rundownGlobalPiecesPrepareTime?: number
226227
}

meteor/server/migration/1_50_0.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ export const addSteps = addMigrationSteps('1.50.0', [
926926
PartId
927927
>()
928928
for (const piece of pieces) {
929-
partIdLookup.set(piece._id, piece.startPartId)
929+
if (piece.startPartId) partIdLookup.set(piece._id, piece.startPartId)
930930
}
931931
for (const adlib of adlibPieces) {
932932
if (adlib.partId) partIdLookup.set(adlib._id, adlib.partId)

0 commit comments

Comments
 (0)