Repository navigation
Validate the Piper voice catalog - #4
Conversation
Reject duplicate YAML keys and invalid voice entries without overwriting the existing manifest. Check generated output in CI and fail if the Piper manifest is missing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
steinbro
left a comment
There was a problem hiding this comment.
Thanks! The comments I've left aren't specific requests of you, more about how we can improve the overall workflow in the repo. I can merge this in once I have tangible plans to address them.
There was a problem hiding this comment.
I think we're well past what's reasonable to do in bash in terms of conditional logic and string manipulation. I like that you've introduced Python for YAML validation, and we should probably convert some of the other scripts to Python too.
There was a problem hiding this comment.
Ported the generator failure and atomicity tests to Python unittest on follow-up/piper-python-tests (commit 3bfe5a4); CI now runs the Python suite. All 9 tests pass locally. I kept this as a separate follow-up to #4.
| `yq` (`sudo apt install yq` on Ubuntu), then run | ||
| `./speech-provider-piper/generate_snapcraft.sh` and commit the regenerated |
There was a problem hiding this comment.
I can add a workshop action for this. Ideally we'd capture all the build dependencies in there so the user doesn't have to install any other dependencies outside of their environment.
| if [[ ! -f speech-provider-piper/snapcraft.yaml ]]; then | ||
| echo 'Required Piper manifest is missing: speech-provider-piper/snapcraft.yaml' >&2 | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
It feels weird to fail for a specific missing snapcraft.yaml when the point of the step is to automatically decide what to build based on finding a snapcraft.yaml.
There was a problem hiding this comment.
Perhaps a previous workflow job should be to run all preprocessors, which would currently just be the speech-provider-piper snapcraft.yaml generator
Address review feedback in discussion_r4738092616 by moving generator failure and atomicity coverage to unittest and invoking it in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run generator tests and verify the committed manifest before discovering snap projects. Remove the discovery-specific Piper guard and the duplicate matrix check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reject duplicate YAML keys, invalid voice entries and component names Snapcraft won’t accept. The generator leaves the existing manifest untouched on failure. CI runs the regression tests, checks that the committed manifest matches generated output, and fails if the Piper manifest is missing.
Relates to UDENG-12310.