Skip to content

Commit b135e0b

Browse files
committed
Merge branch 'master' into develop
# Conflicts: # apps/appcontainer-node/app/package.json # apps/appcontainer-node/packages/generic/package.json # apps/html-renderer/app/package.json # apps/html-renderer/packages/generic/package.json # apps/http-server/app/package.json # apps/http-server/packages/generic/package.json # apps/package-manager/app/package.json # apps/package-manager/packages/generic/package.json # apps/quantel-http-transformer-proxy/app/package.json # apps/quantel-http-transformer-proxy/packages/generic/package.json # apps/single-app/app/package.json # apps/worker/app/package.json # apps/worker/packages/generic/package.json # apps/workforce/app/package.json # apps/workforce/packages/generic/package.json # lerna.json # shared/packages/api/package.json # shared/packages/expectationManager/package.json # shared/packages/worker/package.json # shared/packages/workforce/package.json # tests/internal-tests/package.json # yarn.lock
2 parents a349e74 + 7c4e988 commit b135e0b

File tree

28 files changed

+274
-59
lines changed

28 files changed

+274
-59
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
9+
### Bug Fixes
10+
11+
* An issue where expectations that are fulfilled but waiting on other expectation, loop through fullfilled->new->waiting->fullfilled statuses. ([bad15df](https://github.com/nrkno/tv-automation-package-manager/commit/bad15dff0ec08e7b3873b961ff387bec5d1f2318))
12+
* Check that Quantel source clips exist earlier, to avoid crashing out of a WorkInProgress. ([4c244b1](https://github.com/nrkno/tv-automation-package-manager/commit/4c244b12713c3b3011e105e10c623424a41e2a9d))
13+
* log reason why no worker can handle expectation ([8e7f57d](https://github.com/nrkno/tv-automation-package-manager/commit/8e7f57d35fa3f5fc2daf58b247acbadb0451a64d))
14+
15+
16+
17+
18+
619
# [1.51.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
720

821

apps/appcontainer-node/app/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @appcontainer-node/app
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @appcontainer-node/app

apps/appcontainer-node/packages/generic/CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
9+
### Bug Fixes
10+
11+
* log reason why no worker can handle expectation ([8e7f57d](https://github.com/nrkno/sofie-package-manager/commit/8e7f57d35fa3f5fc2daf58b247acbadb0451a64d))
12+
13+
14+
15+
16+
617
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
718

819
**Note:** Version bump only for package @appcontainer-node/generic

apps/appcontainer-node/packages/generic/src/appContainer.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import {
4040

4141
import { WorkforceAPI } from './workforceApi'
4242
import { WorkerAgentAPI } from './workerAgentApi'
43+
import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package'
4344

4445
/** Mimimum time between app restarts */
4546
const RESTART_COOLDOWN = 60 * 1000 // ms
@@ -413,6 +414,10 @@ export class AppContainer {
413414
this.logger.debug(`Available apps: ${Array.from(this.availableApps.keys()).join(', ')}`)
414415
}
415416

417+
let lastNotSupportReason: ExpectedPackageStatusAPI.Reason = {
418+
user: 'No apps available',
419+
tech: 'No apps available',
420+
}
416421
for (const [appType, availableApp] of this.availableApps.entries()) {
417422
const runningApp = await this.getRunningOrSpawnScalingApp(appType)
418423

@@ -424,6 +429,11 @@ export class AppContainer {
424429
appType: appType,
425430
cost: availableApp.cost,
426431
}
432+
} else {
433+
lastNotSupportReason = result.reason
434+
this.logger.silly(
435+
`App "${appType}": Does not support the expectation, reason: "${result.reason.tech}", cost: "${availableApp.cost}"`
436+
)
427437
}
428438
} else {
429439
this.logger.warn(`appType "${appType}" not available`)
@@ -432,8 +442,8 @@ export class AppContainer {
432442
return {
433443
success: false,
434444
reason: {
435-
user: `No worker supports this expectation`,
436-
tech: `No worker supports this expectation`,
445+
user: `No worker supports this expectation (reason: ${lastNotSupportReason?.user})`,
446+
tech: `No worker supports this expectation (one reason: ${lastNotSupportReason?.tech})`,
437447
},
438448
}
439449
}

apps/html-renderer/app/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @html-renderer/app
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816

apps/html-renderer/packages/generic/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @html-renderer/generic
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @html-renderer/generic

apps/http-server/app/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @http-server/app
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @http-server/app

apps/http-server/packages/generic/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @http-server/generic
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @http-server/generic

apps/package-manager/app/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @package-manager/app
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @package-manager/app

apps/package-manager/packages/generic/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @package-manager/generic
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @package-manager/generic

apps/quantel-http-transformer-proxy/app/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @quantel-http-transformer-proxy/app
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @quantel-http-transformer-proxy/app

apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @quantel-http-transformer-proxy/generic
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @quantel-http-transformer-proxy/generic

apps/single-app/app/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @single-app/app
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @single-app/app

apps/worker/app/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @worker/app
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @worker/app

apps/worker/packages/generic/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @worker/generic
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @worker/generic

apps/workforce/app/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @workforce/app
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @workforce/app

apps/workforce/packages/generic/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
**Note:** Version bump only for package @workforce/generic
9+
10+
11+
12+
13+
614
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
715

816
**Note:** Version bump only for package @workforce/generic

scripts/prepare-for-tests.mjs

+10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import path from 'path'
1313
import cp from 'child_process'
1414
import fetch from 'node-fetch'
1515

16+
console.log(`Preparing for tests...`)
17+
1618
const targetVersions = JSON.parse(await fs.readFile('./tests/ffmpegReleases.json'))
1719

1820
const toPosix = (str) => str.split(path.sep).join(path.posix.sep)
@@ -33,12 +35,14 @@ async function pathExists(path) {
3335

3436
const platformInfo = `${process.platform}-${process.arch}`
3537
const platformVersions = targetVersions[platformInfo]
38+
let didDoAnything = false
3639

3740
if (platformVersions) {
3841
for (const version of platformVersions) {
3942
const versionPath = path.join(ffmpegRootDir, version.id)
4043
const dirStat = await pathExists(versionPath)
4144
if (!dirStat) {
45+
didDoAnything = true
4246
console.log(`Fetching ${version.url}`)
4347
// Download it
4448

@@ -81,3 +85,9 @@ if (platformVersions) {
8185
} else {
8286
throw new Error(`No FFMpeg binaries have been defined for "${platformInfo}" yet`)
8387
}
88+
89+
if (!didDoAnything) {
90+
console.log(`Nothing to prepare!`)
91+
} else {
92+
console.log(`Preparations done!`)
93+
}

shared/packages/api/CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
9+
### Bug Fixes
10+
11+
* An issue where expectations that are fulfilled but waiting on other expectation, loop through fullfilled->new->waiting->fullfilled statuses. ([bad15df](https://github.com/nrkno/sofie-package-manager/commit/bad15dff0ec08e7b3873b961ff387bec5d1f2318))
12+
13+
14+
15+
16+
617
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
718

819

shared/packages/api/src/worker.ts

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export type ReturnTypeIsExpectationReadyToStartWorkingOn =
3131
*/
3232
sourceExists?: boolean
3333
isPlaceholder?: boolean
34-
isWaitingForAnother?: boolean
3534
reason: Reason
3635
}
3736
export type ReturnTypeIsExpectationFulfilled =

shared/packages/expectationManager/CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [1.51.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.1...v1.51.0-alpha.2) (2025-02-10)
7+
8+
9+
### Bug Fixes
10+
11+
* An issue where expectations that are fulfilled but waiting on other expectation, loop through fullfilled->new->waiting->fullfilled statuses. ([bad15df](https://github.com/nrkno/sofie-package-manager/commit/bad15dff0ec08e7b3873b961ff387bec5d1f2318))
12+
13+
14+
15+
16+
617
# [1.51.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.51.0-alpha.0...v1.51.0-alpha.1) (2025-01-08)
718

819
**Note:** Version bump only for package @sofie-package-manager/expectation-manager

shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export async function evaluateExpectationStateFulfilled({
1919
assertState(trackedExp, ExpectedPackageStatusAPI.WorkStatusState.FULFILLED)
2020
// TODO: Some monitor that is able to invalidate if it isn't fulfilled anymore?
2121

22+
// We don't want to check too often if it's still fulfilled:
2223
if (timeSinceLastEvaluation > tracker.getFulfilledWaitTime()) {
2324
await manager.workerAgents.assignWorkerToSession(trackedExp)
2425
if (trackedExp.session.assignedWorker) {

0 commit comments

Comments
 (0)