Refactor schema for sources to use additionalProperties#136
Conversation
📝 WalkthroughWalkthroughThis 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. ChangesSchema + CI updates
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
packages/blueprints/src/$schemas/main-studio-config.json
rjmunro
left a comment
There was a problem hiding this comment.
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?
|
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. |
|
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. |
|
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. |
this is how my modification looks.
and this is how r53 demo blueprints looked for me.
if it helps, here is the default studio file: |
|
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. |
.github/workflows: Migrate workflows to Blacksmith runners
Revert ".github/workflows: Migrate workflows to Blacksmith runners"
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
.github/workflows/node.yamlpackages/blueprints/src/$schemas/main-studio-config.json
| - name: Setup Docker buildx | ||
| uses: docker/setup-buildx-action@v4 | ||
| - name: Setup Blacksmith Builder | ||
| uses: useblacksmith/setup-docker-builder@v1 |
There was a problem hiding this comment.
🧩 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/workflowsRepository: 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.yamlRepository: 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.yamlRepository: 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.



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