Skip to content

Validate the Piper voice catalog - #4

Merged
steinbro merged 3 commits into
project-spiel:mainfrom
paul-geoghegan:fix/piper-voice-catalog
Nov 30, 2026
Merged

steinbro merged 3 commits into
project-spiel:mainfrom
paul-geoghegan:fix/piper-voice-catalog

Conversation

@paul-geoghegan

Copy link
Copy Markdown
Contributor

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.

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 steinbro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Comment thread tests/test_generate_snapcraft.sh Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Comment thread README.md
Comment on lines +40 to +41
`yq` (`sudo apt install yq` on Ubuntu), then run
`./speech-provider-piper/generate_snapcraft.sh` and commit the regenerated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Comment thread .github/workflows/build-snaps.yml Outdated
if [[ ! -f speech-provider-piper/snapcraft.yaml ]]; then
echo 'Required Piper manifest is missing: speech-provider-piper/snapcraft.yaml' >&2
exit 1
fi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Perhaps a previous workflow job should be to run all preprocessors, which would currently just be the speech-provider-piper snapcraft.yaml generator

paul-geoghegan and others added 2 commits November 30, 2026 14:38
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>
@steinbro
steinbro merged commit e25aade into project-spiel:main Nov 30, 2026
6 checks passed
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.

2 participants