Skip to content

Refactor schema for sources to use additionalProperties#136

Open
kubo6472 wants to merge 5 commits into
SuperFlyTV:mainfrom
tojemoc:main
Open

Refactor schema for sources to use additionalProperties#136
kubo6472 wants to merge 5 commits into
SuperFlyTV:mainfrom
tojemoc:main

Conversation

@kubo6472
Copy link
Copy Markdown

Updated the schema for Atem, vMix, and Sisyfos sources to use 'additionalProperties' instead of 'patternProperties'.

This is the proper fix that makes it so it does not result in Unsupported field type "" when someone tries to create an input.

Also fixes closes Sofie-Automation/sofie-core#1749

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR converts dynamic device config schema entries from patternProperties to additionalProperties with explicit per-key object schemas, adjusts one field type in atemOutputs, simplifies sisyfosSources enum metadata, and updates CI jobs to run on Blacksmith runners and use Blacksmith Docker actions.

Changes

Schema + CI updates

Layer / File(s) Summary
CI runners and Docker actions
.github/workflows/node.yaml
CI job runners changed to blacksmith-4vcpu-ubuntu-2404; Docker build setup/actions replaced with useblacksmith/setup-docker-builder@v1 and useblacksmith/build-push-action@v2; conditional push and provenance settings preserved, prior cache config removed.
ATEM & vMix source entry schemas
packages/blueprints/src/$schemas/main-studio-config.json
atemSources and vmixSources now use additionalProperties; each entry is an input object requiring input and type (#/​$defs/SourceType) with existing UI metadata retained.
ATEM output entry schema
packages/blueprints/src/$schemas/main-studio-config.json
atemOutputs now uses additionalProperties; each entry is an output object with output (integer) and source changed to integer.
Sisyfos source entry schema
packages/blueprints/src/$schemas/main-studio-config.json
sisyfosSources now uses additionalProperties; each entry keeps source as integer and type as string with prior enum/tsEnumNames/title removed (UI metadata/default retained).

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Julusian
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly matches the main change: refactoring schema for sources to use additionalProperties instead of patternProperties, which is the primary modification in main-studio-config.json.
Description check ✅ Passed The description is related to the changeset, explaining the schema update for Atem, vMix, and Sisyfos sources and the bug fix it addresses.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/blueprints/src/`$schemas/main-studio-config.json:
- Around line 141-145: The schema field atemOutputs.source is declared as
"type": "number" but should be "integer" to match usage (no decimals) and be
consistent with atemSources.input, vmixSources.input, and sisyfosSources.source;
update the JSON schema in $schemas/main-studio-config.json to change
atemOutputs.source's type from number to integer (keep the same "ui:title" and
"default" value) and ensure any validation/tests referencing atemOutputs.source
still pass; verify related code in atem.ts continues to treat the value as an
integer.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6339faf7-958a-48d3-acaf-aa9b3fc141ac

📥 Commits

Reviewing files that changed from the base of the PR and between 8834b71 and ad05f51.

📒 Files selected for processing (1)
  • packages/blueprints/src/$schemas/main-studio-config.json

Comment thread packages/blueprints/src/$schemas/main-studio-config.json Outdated
Copy link
Copy Markdown
Member

@rjmunro rjmunro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.

Can you fix the indentation of your JSON so it matches the previous version? That will make the actual change you have made much easier to see.

I'm not sure if this fixes the problem or just hides it. Has making this change enabled you to get vMix working?

@kubo6472
Copy link
Copy Markdown
Author

Hi, yeah, sorry. Will do momentarily.

Yes, this made the blueprint configuration page show actual input options/types, not just error.

Probably some sanitization inside of Sofie changed, and nobody tried to load the latest r53 blueprints.

@kubo6472
Copy link
Copy Markdown
Author

About vMix, it does connect to it, load the last preset with the button, etc.. however I still haven't managed to figure out how to actually switch scenes in vMix. Playing the demo rundown itself seems like it only switches to Scene 1 and then just stays on it.

It does play out the GFX and Playout through CasparCG, though.

@kubo6472
Copy link
Copy Markdown
Author

kubo6472 commented May 20, 2026

GitHub is acting up, but after force-pushing it (including the CodeRabbit suggestion) we get a diff like this in vscode:
image

@kubo6472 kubo6472 requested a review from rjmunro May 20, 2026 09:18
@ozcode2009
Copy link
Copy Markdown

Can you go through how you got this working on your system? I installed these blueprints on my system and I do not see the type field for the inputs-- in fact there is no "+" button for me when I built the code from your fork. I was using the "disable version check" in Sofie if that helps at all.

@kubo6472
Copy link
Copy Markdown
Author

kubo6472 commented May 30, 2026

image this is how my modification looks. image and this is how r53 demo blueprints looked for me.

if it helps, here is the default studio file:
demostudio-bundle.js

@ozcode2009
Copy link
Copy Markdown

Thank you so much. Working for me now. I must've been doing something wrong in the build process- I have very little nodejs experience.

@kubo6472
Copy link
Copy Markdown
Author

Thank you so much. Working for me now. I must've been doing something wrong in the build process- I have very little nodejs experience.

no worries, I was very scared myself, since following the documentation was not resulting in a succesful deployment. I am willing to contribute to the docs, I just have to get a lot more comfortable using sofie.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/node.yaml:
- Line 132: The workflow uses third-party actions referenced by mutable tags
(e.g., actions/setup-node@v6, actions/cache@v5, peaceiris/actions-gh-pages@v4,
docker/setup-buildx-action@v4, docker/login-action@v4,
docker/metadata-action@v6, docker/build-push-action@v7); update each `uses:`
entry to its corresponding immutable commit SHA for those action identifiers
(e.g., replace actions/setup-node@v6 with actions/setup-node@<full-commit-sha>,
and do the same for actions/cache, peaceiris/actions-gh-pages,
docker/setup-buildx-action, docker/login-action, docker/metadata-action,
docker/build-push-action) by looking up the canonical commit for the desired tag
in each action's GitHub repo and substituting the tag with that full SHA.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6322a3ff-a27b-4d33-84e6-fcfa0bf5a04d

📥 Commits

Reviewing files that changed from the base of the PR and between 8978253 and 216023d.

📒 Files selected for processing (2)
  • .github/workflows/node.yaml
  • packages/blueprints/src/$schemas/main-studio-config.json

Comment thread .github/workflows/node.yaml Outdated
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v4
- name: Setup Blacksmith Builder
uses: useblacksmith/setup-docker-builder@v1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find workflow `uses:` entries not pinned to a full commit SHA.
rg -nP --type=yaml '^\s*uses:\s*[^@]+@(?!(?:[0-9a-f]{40})$).+$' .github/workflows

Repository: SuperFlyTV/sofie-demo-blueprints

Length of output: 768


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Check uses entries around lines 120-165 =="
sed -n '110,165p' .github/workflows/node.yaml | nl -ba | sed -n '1,120p'

echo
echo "== Look for useblacksmith/setup-docker-builder =="
rg -n "useblacksmith/setup-docker-builder" .github/workflows/node.yaml || true

echo
echo "== Show full uses lines (no surrounding context) =="
rg -n --type=yaml '^\s*uses:\s*.+$' .github/workflows/node.yaml

Repository: SuperFlyTV/sofie-demo-blueprints

Length of output: 183


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Check uses entries around lines 120-165 =="
sed -n '110,165p' .github/workflows/node.yaml | cat -n

echo
echo "== Look for useblacksmith/setup-docker-builder =="
rg -n "useblacksmith/setup-docker-builder" .github/workflows/node.yaml || true

echo
echo "== Show full uses lines =="
rg -n --type=yaml '^\s*uses:\s*.+$' .github/workflows/node.yaml

Repository: SuperFlyTV/sofie-demo-blueprints

Length of output: 2505


Pin GitHub Actions in .github/workflows/node.yaml to immutable SHAs.

This workflow uses several third-party actions pinned only by version tags (e.g., @v4, @v6, @v7), violating the repo’s unpinned-action policy:

  • actions/setup-node@v6 (lines 27, 57, 88)
  • actions/cache@v5 (lines 31, 61)
  • peaceiris/actions-gh-pages@v4 (line 105)
  • docker/setup-buildx-action@v4 (line 132)
  • docker/login-action@v4 (line 137)
  • docker/metadata-action@v6 (line 146)
  • docker/build-push-action@v7 (line 153)

Pin each uses: reference to the full commit SHA (immutable) instead of a tag.

🧰 Tools
🪛 zizmor (1.25.2)

[error] 132-132: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/node.yaml at line 132, The workflow uses third-party
actions referenced by mutable tags (e.g., actions/setup-node@v6,
actions/cache@v5, peaceiris/actions-gh-pages@v4, docker/setup-buildx-action@v4,
docker/login-action@v4, docker/metadata-action@v6, docker/build-push-action@v7);
update each `uses:` entry to its corresponding immutable commit SHA for those
action identifiers (e.g., replace actions/setup-node@v6 with
actions/setup-node@<full-commit-sha>, and do the same for actions/cache,
peaceiris/actions-gh-pages, docker/setup-buildx-action, docker/login-action,
docker/metadata-action, docker/build-push-action) by looking up the canonical
commit for the desired tag in each action's GitHub repo and substituting the tag
with that full SHA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: VMix not initialized yet

3 participants