fix: parse a snap file for the sign-build command
Metadata
Current evaluation
Merged PR #5826 (commit bf00a385e) fixed sign-build snap-file parsing and removed duplicate --local help text; it fixes #5618.
Resolution: closed resolved
Reason: PR #5826 was merged with approval, and commit bf00a385e records the fix. The PR explicitly fixes #5618 by aligning the modern and legacy sign-build interfaces on the snap-file argument.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `make lint`?
- [x] Have you successfully run `make test`?
---
Snapcraft's legacy code passthrough requires that the modern Craft CLI implementations of legacy's CLI interfaces have the exact same arguments. For example, a legacy command with a click argument for `--foo` should have a corresponding `--foo` on its modern Craft CLI interface. This wasn't the case for the `sign-build` command, so following the advice of `--help` (generated by Craft CLI) would result in an error as the legacy backend expected `snap-file`, but providing a `snap-file` would result in an error as Craft CLI's validation of the argparse namespace would complain about `snap-file`.
This PR fixes that behavior, and as a drive-by, also removes this extra `--local` in the help text:
```
--local, --local: sign assertion, but do not upload to the Snap
Store
```
Fixes #5618.
SNAPCRAFT-1180
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #5826 (commit bf00a385e) fixed sign-build snap-file parsing and removed duplicate --local help text; it fixes #5618. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #5826 (commit bf00a385e) fixed sign-build snap-file parsing and removed duplicate --local help text; fixes #5618. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #5826 (commit bf00a385e), fixing sign-build snap-file argument parsing and removing the duplicated --local help text; fixes #5618. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix aligning legacy and modern Craft CLI argument parsing for the sign-build command, resolving mismatch errors. Also removed redundant --local help text. Addresses #5618. Approved and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix aligning the sign-build command's modern Craft CLI with legacy argument expectations. Correctly parses the snap-file argument and removes a redundant --local help text flag. Resolves #5618. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
snapcraft#5618
(confidence 100%)
PR #5826 explicitly states "Fixes #5618"; the linked issue is recorded as fixed by commit bf00a385e.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5618 sign-build --local just doesn't work | snapcraft | closed | Fixed by merged PR #5826 (commit bf00a385e, "fix: parse a snap file for the sign-build command"), which declared the missing snap-file argument in the legacy sign-build command; tracked internally as SNAPCRAFT-1180. | |
| #831 'sign-build' implementation. | snapcraft | merged | Merged as commit ded7281c9, adding sign-build to generate, sign, and optionally push snap-build assertions; superseded PR #795. | |
| #6228 refactor: migrate sign-build command | snapcraft | merged | Merged PR #6228 as commit 2904d0be2, migrating the sign-build command from Snapcraft's legacy codebase as part of SNAPCRAFT-1320. | |
| #839 Fixing 'sign-build' integration tests. | snapcraft | merged | Merged in canonical/snapcraft#839 as commit b67a60d58, fixing sign-build integration tests by registering snap names and exposing them through the fake account-info endpoint. |