From 8554f6051c277be7d254bdcd9e3aa1b3ab801a10 Mon Sep 17 00:00:00 2001 From: Mint de Wit Date: Fri, 12 Apr 2024 08:03:56 +0200 Subject: [PATCH 1/3] fix: failover to buddy when main not up to date --- packages/connector/src/MosDevice.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/connector/src/MosDevice.ts b/packages/connector/src/MosDevice.ts index 9b11114a..83933b61 100644 --- a/packages/connector/src/MosDevice.ts +++ b/packages/connector/src/MosDevice.ts @@ -1539,6 +1539,13 @@ export class MosDevice implements IMOSDevice { throw new Error('Buddy server cannot respond because main server is available') } + if ( + reply.mos.roAck && + reply.mos.roAck.roStatus === 'Main server back on line but not yet updated with most recent data' + ) { + throw new Error('Main server back on line but not yet updated with most recent data') + } + if (reply.mos.mosAck && reply.mos.mosAck.status === 'NACK') { throw new Error(`Error in response: ${reply.mos.mosAck.statusDescription || 'No statusDescription given'}`) } From 19eb08f13e5885e34b9f945a08fe905197562eee Mon Sep 17 00:00:00 2001 From: Mint de Wit Date: Fri, 12 Apr 2024 09:48:28 +0200 Subject: [PATCH 2/3] chore: someone broke ci and it wasnt me --- .github/workflows/publish-prerelease.yaml | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-prerelease.yaml b/.github/workflows/publish-prerelease.yaml index 496b2542..70a441ee 100644 --- a/.github/workflows/publish-prerelease.yaml +++ b/.github/workflows/publish-prerelease.yaml @@ -85,7 +85,7 @@ jobs: COMMIT_DATE=$(date -d @$COMMIT_TIMESTAMP +%Y%m%d-%H%M%S) GIT_HASH=$(git rev-parse --short HEAD) PRERELEASE_TAG=nightly-$(echo "${{ github.ref_name }}" | sed -r 's/[^a-z0-9]+/-/gi') - yarn release:bump-prerelease --no-changelog --no-commit-hooks --preid "$PRERELEASE_TAG-$COMMIT_DATE-$GIT_HASH" prerelease --yes + yarn release:bump-prerelease-ci --no-changelog --no-commit-hooks --preid "$PRERELEASE_TAG-$COMMIT_DATE-$GIT_HASH" prerelease --yes env: CI: true - name: Publish to NPM diff --git a/package.json b/package.json index 55e30eae..11b47258 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "release:set-version": "lerna version --exact --no-changelog --no-push --yes && yarn fix-version", "release:bump-release": "lerna version --exact --conventional-commits --conventional-graduate --tag-version-prefix='v' --no-push --force-publish='*' && yarn fix-version", "release:bump-prerelease": "lerna version --exact --conventional-commits --conventional-prerelease --tag-version-prefix='v' --no-push --force-publish='*' && yarn fix-version", + "release:bump-prerelease-ci": "lerna version --exact --conventional-commits --conventional-prerelease --tag-version-prefix='v' --no-push --force-publish='*' && yarn fix-version", "fix-version": "node scripts/fix-version.js", "setup": "lerna bootstrap", "reset": "node scripts/reset.js", @@ -49,4 +50,4 @@ }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "packageManager": "yarn@3.6.0" -} +} \ No newline at end of file From a155d249d12b58c4b6aeb5f93565747d6f3673ed Mon Sep 17 00:00:00 2001 From: Mint de Wit Date: Fri, 12 Apr 2024 10:16:23 +0200 Subject: [PATCH 3/3] chore --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 11b47258..e85dc925 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "release:set-version": "lerna version --exact --no-changelog --no-push --yes && yarn fix-version", "release:bump-release": "lerna version --exact --conventional-commits --conventional-graduate --tag-version-prefix='v' --no-push --force-publish='*' && yarn fix-version", "release:bump-prerelease": "lerna version --exact --conventional-commits --conventional-prerelease --tag-version-prefix='v' --no-push --force-publish='*' && yarn fix-version", - "release:bump-prerelease-ci": "lerna version --exact --conventional-commits --conventional-prerelease --tag-version-prefix='v' --no-push --force-publish='*' && yarn fix-version", + "release:bump-prerelease-ci": "lerna version --exact --conventional-commits --conventional-prerelease --tag-version-prefix='v' --no-push --force-publish='*'", "fix-version": "node scripts/fix-version.js", "setup": "lerna bootstrap", "reset": "node scripts/reset.js", @@ -50,4 +50,4 @@ }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "packageManager": "yarn@3.6.0" -} \ No newline at end of file +}