Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,35 +265,6 @@ jobs:
labels: ${{ steps.dockerhub-tag.outputs.labels }}
tags: ${{ steps.dockerhub-tag.outputs.tags }}

# Trivy scanning
- name: Get image for Trivy scanning
id: trivy-image
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
run: |
image=$(echo ${{ steps.ghcr-tag.outputs.tags }} | head -n 1)
echo "image=$image" >> $GITHUB_OUTPUT
- name: Trivy scanning
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
uses: aquasecurity/trivy-action@0.35.0
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
image-ref: "${{ steps.trivy-image.outputs.image }}"
format: "table"
output: trivy-scan-result.txt
ignore-unfixed: true
severity: "CRITICAL,HIGH"
- name: Post all Trivy scan results to Github Summary as a table
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
env:
CODE_BLOCK: "```"
run: |
echo "# Trivy scan results ~ core" >> $GITHUB_STEP_SUMMARY

echo $CODE_BLOCK >> $GITHUB_STEP_SUMMARY
cat trivy-scan-result.txt >> $GITHUB_STEP_SUMMARY
echo $CODE_BLOCK >> $GITHUB_STEP_SUMMARY

build-gateways:
# TODO - should this be dependant on tests or something passing if we are on a tag?
name: Build gateways
Expand Down Expand Up @@ -437,35 +408,6 @@ jobs:
labels: ${{ steps.dockerhub-tag.outputs.labels }}
tags: "${{ steps.dockerhub-tag.outputs.tags }}"

# Trivy scanning
- name: Get image for Trivy scanning
id: trivy-image
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
run: |
image=$(echo ${{ steps.ghcr-tag.outputs.tags }} | head -n 1)
echo "image=$image" >> $GITHUB_OUTPUT
- name: Trivy scanning
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
uses: aquasecurity/trivy-action@0.35.0
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
image-ref: "${{ steps.trivy-image.outputs.image }}"
format: "table"
output: ${{ matrix.gateway-name }}-trivy-scan-result.txt
ignore-unfixed: true
severity: "CRITICAL,HIGH"
- name: Post all Trivy scan results to Github Summary as a table
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
env:
CODE_BLOCK: "```"
run: |
echo "# Trivy scan results ~ ${{ matrix.gateway-name }}" >> $GITHUB_STEP_SUMMARY

echo $CODE_BLOCK >> $GITHUB_STEP_SUMMARY
cat ${{ matrix.gateway-name }}-trivy-scan-result.txt >> $GITHUB_STEP_SUMMARY
echo $CODE_BLOCK >> $GITHUB_STEP_SUMMARY

lint-packages:
name: Lint Packages
runs-on: ubuntu-latest
Expand Down
98 changes: 0 additions & 98 deletions .github/workflows/trivy.yml

This file was deleted.

41 changes: 21 additions & 20 deletions meteor/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4637,24 +4637,25 @@ __metadata:
languageName: node
linkType: hard

"fast-xml-builder@npm:^1.0.0":
version: 1.1.1
resolution: "fast-xml-builder@npm:1.1.1"
"fast-xml-builder@npm:^1.1.4":
version: 1.1.4
resolution: "fast-xml-builder@npm:1.1.4"
dependencies:
path-expression-matcher: "npm:^1.1.3"
checksum: 10/9e410f3d13d86ff398fdf712a71151c43c599a42d5cab64659172126b9f4f980135afc80c828026211fdfbcee525f2427d587af3190d0c8d03db5ba595bfade5
checksum: 10/32937866aaf5a90e69d1f4ee6e15e875248d5b5d2afd70277e9e8323074de4980cef24575a591b8e43c29f405d5f12377b3bad3842dc412b0c5c17a3eaee4b6b
languageName: node
linkType: hard

"fast-xml-parser@npm:^5.2.5":
version: 5.4.2
resolution: "fast-xml-parser@npm:5.4.2"
version: 5.5.8
resolution: "fast-xml-parser@npm:5.5.8"
dependencies:
fast-xml-builder: "npm:^1.0.0"
strnum: "npm:^2.1.2"
fast-xml-builder: "npm:^1.1.4"
path-expression-matcher: "npm:^1.2.0"
strnum: "npm:^2.2.0"
bin:
fxparser: src/cli/cli.js
checksum: 10/12585d5dd77113411d01cf41818cfecbbaf8f3d9e8448b1c35f50a7eb51205408bc8db27af5733173a77f96f72d7e121d9e675674f71334569157c77845aba39
checksum: 10/888f9a5d345e65e34b70d394798a1542603a216f06c140a9671d031b80b42c01ef2e68f2a0ceea45e7703fa80549f0e06da710f5a2faafdc910d1b6b354f0fa0
languageName: node
linkType: hard

Expand Down Expand Up @@ -4789,9 +4790,9 @@ __metadata:
linkType: hard

"flatted@npm:^3.2.9":
version: 3.3.2
resolution: "flatted@npm:3.3.2"
checksum: 10/ac3c159742e01d0e860a861164bcfd35bb567ccbebb8a0dd041e61cf3c64a435b917dd1e7ed1c380c2ebca85735fb16644485ec33665bc6aafc3b316aa1eed44
version: 3.4.2
resolution: "flatted@npm:3.4.2"
checksum: 10/a9e78fe5c2c1fcd98209a015ccee3a6caa953e01729778e83c1fe92e68601a63e1e69cd4e573010ca99eaf585a581b80ccf1018b99283e6cbc2117bcba1e030f
languageName: node
linkType: hard

Expand Down Expand Up @@ -8224,10 +8225,10 @@ __metadata:
languageName: node
linkType: hard

"path-expression-matcher@npm:^1.1.3":
version: 1.1.3
resolution: "path-expression-matcher@npm:1.1.3"
checksum: 10/9a607d0bf9807cf86b0a29fb4263f0c00285c13bedafb6ad3efc8bc87ae878da2faf657a9138ac918726cb19f147235a0ca695aec3e4ea1ee04641b6520e6c9e
"path-expression-matcher@npm:^1.1.3, path-expression-matcher@npm:^1.2.0":
version: 1.2.0
resolution: "path-expression-matcher@npm:1.2.0"
checksum: 10/eab23babd9a97d6cf4841a99825c3e990b70b2b29ea6529df9fb6a1f3953befbc68e9e282a373d7a75aff5dc6542d05a09ee2df036ff9bfddf5e1627b769875b
languageName: node
linkType: hard

Expand Down Expand Up @@ -9649,10 +9650,10 @@ __metadata:
languageName: node
linkType: hard

"strnum@npm:^2.1.2":
version: 2.2.0
resolution: "strnum@npm:2.2.0"
checksum: 10/2969dbc8441f5af1b55db1d2fcea64a8f912de18515b57f85574e66bdb8f30ae76c419cf1390b343d72d687e2aea5aca82390f18b9e0de45d6bcc6d605eb9385
"strnum@npm:^2.2.0":
version: 2.2.2
resolution: "strnum@npm:2.2.2"
checksum: 10/c55813cfded750dc84556b4881ffc7cee91382ff15a48f1fba0ff7a678e1640ed96ca40806fbd55724940fd7d51cf752469b2d862e196e4adefb6c7d5d9cd73b
languageName: node
linkType: hard

Expand Down
4 changes: 2 additions & 2 deletions packages/job-worker/src/playout/__tests__/timeline.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1893,11 +1893,11 @@ describe('Timeline', () => {
currentInfinitePieces: {
piece002: {
// Should still be based on the time of previousPart
partGroup: { start: firstPartTakeTime },
pieceGroup: {
controlObj: { start: 500 },
childGroup: { preroll: 0, postroll: 0 },
},
partGroup: { start: firstPartTakeTime - 500 }, // this is Piece plannedStartedPlayback minus pieceGroup.controlObj.start
},
},
previousOutTransition: undefined,
Expand Down Expand Up @@ -1973,7 +1973,7 @@ describe('Timeline', () => {
},
},
partGroup: {
start: plannedStartedPlayback,
start: plannedStartedPlayback - 500, // this is plannedStartedPlayback minus pieceGroup.controlObj.start
},
},
},
Expand Down
18 changes: 16 additions & 2 deletions packages/job-worker/src/playout/timeline/multi-gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { PlayoutModel } from '../model/PlayoutModel.js'
import { RundownTimelineTimingContext, getInfinitePartGroupId } from './rundown.js'
import { PlayoutPartInstanceModel } from '../model/PlayoutPartInstanceModel.js'
import { PlayoutPieceInstanceModel } from '../model/PlayoutPieceInstanceModel.js'
import { getPieceControlObjectId } from '@sofie-automation/corelib/dist/playout/ids'

/**
* We want it to be possible to generate a timeline without it containing any `start: 'now'`.
Expand Down Expand Up @@ -297,7 +298,7 @@ function setPlannedTimingsOnPieceInstance(

const userDurationEnd =
pieceInstance.pieceInstance.userDuration && 'endRelativeToPart' in pieceInstance.pieceInstance.userDuration
? pieceInstance.pieceInstance.userDuration.endRelativeToPart
? partPlannedStart + pieceInstance.pieceInstance.userDuration.endRelativeToPart
: null

let plannedEnd: number | undefined = userDurationEnd ?? undefined
Expand Down Expand Up @@ -334,14 +335,27 @@ function preserveOrTrackInfiniteTimings(
// Update the timeline group
const startedPlayback = plannedStartedPlayback ?? pieceInstance.pieceInstance.plannedStartedPlayback
if (startedPlayback) {
const pieceControlObjectId = getPieceControlObjectId(pieceInstance.pieceInstance)
const pieceControlObj = timelineObjsMap[pieceControlObjectId]

// this replicates what generateCurrentInfinitePieceObjects() does
let pieceEnableStartOffset = 0
if (
pieceControlObj &&
!Array.isArray(pieceControlObj.enable) &&
typeof pieceControlObj.enable?.start === 'number'
) {
pieceEnableStartOffset = pieceControlObj.enable.start
}

const infinitePartGroupId = getInfinitePartGroupId(pieceInstance.pieceInstance._id)
const infinitePartGroupObj = timelineObjsMap[infinitePartGroupId]
if (
infinitePartGroupObj &&
!Array.isArray(infinitePartGroupObj.enable) &&
typeof infinitePartGroupObj.enable.start === 'string'
) {
infinitePartGroupObj.enable.start = startedPlayback
infinitePartGroupObj.enable.start = startedPlayback - pieceEnableStartOffset
}
}
}
17 changes: 16 additions & 1 deletion packages/job-worker/src/playout/timeline/rundown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,16 @@ function generateCurrentInfinitePieceObjects(
return []
}

/*
Notes on the "Infinite Part Group":
Infinite pieces are put into a parent "infinite Part Group" object instead of the usual Part Group,
because their lifetime can be outside of their Part.

The Infinite Part Group's start time is set to be the start time of the Piece, but this is then complicated by
the Piece.enable.start assuming that it is relative to the PartGroup it is in. This is being factored in if an
absolute start time is known for the piece.
*/

const { infiniteGroupEnable, pieceEnable, nowInParent } = calculateInfinitePieceEnable(
currentPartInfo,
timingContext,
Expand Down Expand Up @@ -350,7 +360,12 @@ function calculateInfinitePieceEnable(
)

let infiniteGroupEnable: PartEnable = {
start: `#${timingContext.currentPartGroup.id}.start`, // This gets overriden with a concrete time if the original piece is known to have already started
/*
This gets overridden with a concrete time if the original piece is known to have already started
but if not, allows the pieceEnable to be relative to the currentPartInstance's part group as normal
and `nowInParent` to be correct for the piece objects inside
*/
start: `#${timingContext.currentPartGroup.id}.start`,
}

let nowInParent = currentPartInfo.partTimes.nowInPart // Where is 'now' inside of the infiniteGroup?
Expand Down
2 changes: 2 additions & 0 deletions packages/meteor-lib/src/triggers/RundownViewEventBus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export enum RundownViewEvents {

TOGGLE_SHELF_DROPZONE = 'toggleShelfDropzone',
ITEM_DROPPED = 'itemDropped',
CLOSE_NOTIFICATIONS = 'closeNotifications',
}

export interface IEventContext {
Expand Down Expand Up @@ -162,6 +163,7 @@ export interface RundownViewEventBusEvents {
[RundownViewEvents.CREATE_SNAPSHOT_FOR_DEBUG]: [e: BaseEvent]
[RundownViewEvents.TOGGLE_SHELF_DROPZONE]: [e: ToggleShelfDropzoneEvent]
[RundownViewEvents.ITEM_DROPPED]: [e: ItemDroppedEvent]
[RundownViewEvents.CLOSE_NOTIFICATIONS]: []
}

class RundownViewEventBus0 extends EventEmitter<RundownViewEventBusEvents> {}
Expand Down
4 changes: 2 additions & 2 deletions packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"jest-environment-jsdom": "^30.2.0",
"jest-mock-extended": "^4.0.0",
"json-schema-to-typescript": "^15.0.4",
"lerna": "^9.0.5",
"nodemon": "^2.0.22",
"lerna": "^9.0.7",
"nodemon": "^3.1.14",
"open-cli": "^8.0.0",
"pinst": "^3.0.0",
"prettier": "^3.8.1",
Expand Down
Loading
Loading