Skip to content

Commit

Permalink
Merge branch 'bbc-release52' into feat/lsg-type-generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Dec 18, 2024
2 parents f095995 + 1df65e8 commit d392594
Show file tree
Hide file tree
Showing 654 changed files with 21,734 additions and 16,246 deletions.
4 changes: 1 addition & 3 deletions .github/actions/setup-meteor/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ description: "Setup Meteor"
runs:
using: "composite"
steps:
- run: curl "https://install.meteor.com/?release=2.13.3" | sh
shell: bash
- run: meteor npm install -g yarn
- run: curl "https://install.meteor.com/?release=3.1" | sh
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
yarn
cd meteor
meteor yarn validate:prod-dependencies
yarn validate:prod-dependencies
env:
CI: true

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
yarn
cd meteor
meteor yarn run validate:all-dependencies
yarn run validate:all-dependencies
env:
CI: true

Expand Down
38 changes: 15 additions & 23 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# setup zodern:types. No linters are setup, so this simply installs the packages
meteor lint
meteor yarn ci:lint
yarn ci:lint
env:
CI: true

Expand Down Expand Up @@ -85,12 +85,12 @@ jobs:
# setup zodern:types. No linters are setup, so this simply installs the packages
meteor lint
NODE_OPTIONS="--max-old-space-size=6144" meteor yarn unitci --force-exit
NODE_OPTIONS="--max-old-space-size=6144" yarn unitci --force-exit
env:
CI: true
- name: Send coverage
if: ((github.event_name == 'pull_request') && (!startsWith(github.head_ref, 'release'))) || ((github.event_name == 'push') && (!startsWith(github.ref_name, 'release')))
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand Down Expand Up @@ -246,7 +246,7 @@ jobs:
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.24.0
uses: aquasecurity/trivy-action@0.29.0
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
Expand Down Expand Up @@ -397,7 +397,7 @@ jobs:
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.24.0
uses: aquasecurity/trivy-action@0.29.0
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
Expand Down Expand Up @@ -482,38 +482,30 @@ jobs:
- server-core-integration
- shared-lib
# - live-status-gateway-api # no tests yet
node-version: [14.x, 18.x, 20.x, 22.x]
- openapi
node-version: [22.x]
include:
# include additional configs, to run certain packages only for a certain version of node
- node-version: 14.x
- node-version: 22.x
package-name: corelib
send-coverage: true
- node-version: 14.x
- node-version: 22.x
package-name: job-worker
send-coverage: true
# manual openapi to avoid testing for 14.x
- node-version: 18.x
package-name: openapi
- node-version: 20.x
package-name: openapi
- node-version: 22.x
package-name: openapi
# No tests for the gateways yet
# - node-version: 18.x
# - node-version: 22.x
# package-name: playout-gateway
# - node-version: 18.x
# - node-version: 22.x
# package-name: mos-gateway
- node-version: 18.x
- node-version: 22.x
package-name: live-status-gateway
send-coverage: true
- node-version: 18.x
- node-version: 22.x
package-name: webui
# manual meteor-lib as it only needs a couple of versions
- node-version: 18.x
- node-version: 22.x
package-name: meteor-lib
send-coverage: true
- node-version: 14.x
package-name: meteor-lib

steps:
- uses: actions/checkout@v4
Expand All @@ -533,7 +525,7 @@ jobs:
run: |
cd packages
yarn config set cacheFolder /home/runner/test-packages-cache
node is_node_14.js && yarn lerna run --ignore openapi install || yarn install
yarn install
yarn lerna run --scope \*\*/${{ matrix.package-name }} --include-dependencies --stream build
env:
CI: true
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/prerelease-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,8 @@ jobs:
- server-core-integration
- shared-lib
# - live-status-gateway-api # no tests yet
node-version: [14.x, 18.x, 20.x, 22.x]
include:
# manual openapi to avoid testing for 14.x
- node-version: 18.x
package-name: openapi
- node-version: 20.x
package-name: openapi
- node-version: 22.x
package-name: openapi
- openapi
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down
83 changes: 34 additions & 49 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Scheduled Trivy Scan
on:
workflow_dispatch:
schedule:
- cron: '0 10 * * 1'
- cron: "0 10 * * 1"

jobs:
trivy:
Expand All @@ -17,21 +17,21 @@ jobs:

steps:
- name: Run Trivy vulnerability scanner (json)
uses: aquasecurity/trivy-action@0.24.0
uses: aquasecurity/trivy-action@0.29.0
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
image-ref: ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
format: json
output: '${{ matrix.image }}-trivy-scan-results.json'
output: "${{ matrix.image }}-trivy-scan-results.json"

- name: Run Trivy vulnerability scanner (table)
uses: aquasecurity/trivy-action@0.24.0
uses: aquasecurity/trivy-action@0.29.0
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
image-ref: ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
output: '${{ matrix.image }}-trivy-scan-results.txt'
output: "${{ matrix.image }}-trivy-scan-results.txt"

- name: Post all scan results to Github Summary as a table
env:
Expand All @@ -44,12 +44,12 @@ jobs:
echo $CODE_BLOCK >> $GITHUB_STEP_SUMMARY
- name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph
uses: aquasecurity/trivy-action@0.24.0
uses: aquasecurity/trivy-action@0.29.0
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
format: 'github'
output: 'dependency-results-${{ matrix.image }}.sbom.json'
format: "github"
output: "dependency-results-${{ matrix.image }}.sbom.json"
image-ref: ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
github-pat: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -64,46 +64,31 @@ jobs:
echo ${{ env.SUMMARY }}
- name: Send Slack Notification
uses: slackapi/slack-github-action@v1.27.0
uses: slackapi/slack-github-action@v2.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"text": "Trivy scan results",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Trivy scan results for sofie-core-${{ matrix.image }}:latest"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":thisisfine: ${{ env.SUMMARY }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Read the full scan results on Github"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": ":github: Scan results",
"emoji": true
},
"value": "workflow_run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"action_id": "button-action"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
text: "Trivy scan results"
blocks:
- type: "header"
text:
type: "plain_text"
text: "Trivy scan results for sofie-core-${{ matrix.image }}:latest"
- type: "section"
text:
type: "mrkdwn"
text: ":thisisfine: ${{ env.SUMMARY }}"
- type: "section"
text:
type: "mrkdwn"
text: "Read the full scan results on Github"
accessory:
type: "button"
text:
type: "plain_text"
text: ":github: Scan results"
emoji: true
value: "workflow_run"
url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
action_id: "button-action"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ meteor/.coverage/
node_modules
**/yarn-error.log
scratch/
meteor-settings.json

# Exclude JetBrains IDE specific files
.idea
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16
22.11
13 changes: 6 additions & 7 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ Follow these instructions to start up Sofie Core in development mode. (For produ

### Prerequisites

- Install [Node.js](https://nodejs.org) 14 (using [nvm](https://github.com/nvm-sh/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows) is the recommended way to install Node.js)
- Install [Meteor](https://www.meteor.com/install) (`npm install --global meteor@2`)
- Install [Node.js](https://nodejs.org) 18 (using the same method you used above, you can uninstall node 14 if needed)
- Install an older version of corepack (`npm install --global [email protected]`)
- Install [Node.js](https://nodejs.org) 20 (using [nvm](https://github.com/nvm-sh/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows) is the recommended way to install Node.js)
- Install [Meteor](https://www.meteor.com/install) (`npm install --global meteor`)
- Enable [corepack](https://nodejs.org/api/corepack.html#corepack) (`corepack enable`) as administrator/root. If `corepack` is not found, you may need to install it first with `npm install --global corepack`

- If on Windows, you may need to `npm install --global windows-build-tools` but this is not always necessary
Expand All @@ -31,6 +29,7 @@ Follow these instructions to start up Sofie Core in development mode. (For produ
```bash
git clone -b master https://github.com/nrkno/sofie-core.git
cd sofie-core
yarn
yarn start
```

Expand Down Expand Up @@ -138,13 +137,13 @@ Then submit this as a PR.

### ConfigManifests

The ConfigManifests for Blueprints and Gateways was replaced with JSONSchema in R50.
The ConfigManifests for Blueprints and Gateways was replaced with JSONSchema in R50.
However, one usage by AdlibActions for their userDataManifest remains as this is not something we are actively using.

## Blueprint Migrations

In R49, a replacement flow was added consisting of `validateConfig` and `applyConfig`.
It is no longer recommended to use the old migrations flow for showstyle and studio blueprints.
In R52, the replacement flow of `validateConfig` and `applyConfig` was extended to the system blueprint
It is no longer recommended to use the old migrations flow for system blueprints.

### ExpectedMediaItems

Expand Down
1 change: 0 additions & 1 deletion meteor/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.meteor
public
eslint-rules
scripts
server/_force_restart.js
/packages/
3 changes: 1 addition & 2 deletions meteor/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const tmpRules = {
}

const tsBase = {
extends: [...tsExtends, 'plugin:custom-rules/all'],
extends: [...tsExtends],
plugins: tsPlugins,
...tsParser,
settings: {
Expand Down Expand Up @@ -50,7 +50,6 @@ const tsBase = {
allowModules: ['meteor', 'mongodb'],
},
],
'jest/no-standalone-expect': 'off', // testInFiber confuses the rule
...tmpRules,
},
}
Expand Down
18 changes: 7 additions & 11 deletions meteor/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@

# but you can also edit it by hand.

meteor[email protected] # Packages every Meteor app needs to have
[email protected] # The database Meteor supports right now
reactive-var@1.0.12 # Reactive variable for tracker
meteor@2.0.1
[email protected]
ddp@1.4.2

[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # Enable TypeScript syntax in .ts and .tsx modules
[email protected] # Server-side component of the `meteor shell` command
[email protected] # The database Meteor supports right now

[email protected] # Meteor's client-side reactive programming library
[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # Enable TypeScript syntax in .ts and .tsx modules

[email protected]
ostrio:meteor-root
[email protected]
[email protected] # Meteor's client-side reactive programming library

julusian:[email protected]
zodern:types
2 changes: 1 addition & 1 deletion meteor/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@2.13.3
METEOR@3.1
Loading

0 comments on commit d392594

Please sign in to comment.