← Back to issue list

fix(remote-build): error with a resolution when '--platform' is used

View original Github issue

Metadata

Project
snapcraft
Number
#6453
Type
pull request
State
closed
Author
wak327
Labels
—
Created
Updated
Closed

Current evaluation

PR #6453 proposed clearer remote-build --platform guidance pointing to --build-for, but was closed unmerged after no review; issue #5387 remains open.

Resolution: closed stale

Reason: The pull request was closed without merging after receiving no reviewer engagement, so no fix was delivered. Issue #5387 remains open because remote-build still lacks the proposed migration guidance.

Evaluated by: mr-cal-bot

No scores available.

Issue body

`--platform` was removed from `remote-build` in Snapcraft 8.7.0, and using it has since failed with a generic argparse error: ``` Error: unrecognized arguments: --platform amd64 ``` `remote-build` now parses the argument, hidden from the help, only to fail early with an error that recommends `--build-for`. The error is raised before the public upload confirmation prompt: ``` '--platform' is not supported for remote builds. Recommended resolution: Use '--build-for' to select the architectures to build for. For more information, check out: https://documentation.ubuntu.com/snapcraft/<version>/explanation/remote-build.html ``` Fixes #5387 --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test`. - [ ] I've added or updated any relevant documentation. - [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale PR #6453 proposed clearer remote-build --platform guidance pointing to --build-for, but was closed unmerged after no review; issue #5387 remains open.
stealth/space-bunny-alpha — closed stale PR #6453 was closed unmerged; its clearer remote-build --platform error was not adopted, and #5387 remains open.
qwen/qwen3.8-27b — closed stale PR closed without merge. remote-build --platform error improvement (recommending --build-for) was submitted by wak327 to fix #5387, but received no reviewer engagement and was closed with the change unmerged; issue #5387 remains open.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 18
Complexity: 20
Confidence: 76
Actionability: 75
needs review Adds a hidden --platform argument to `remote-build` that fails early with a resolution recommending --build-for, instead of argparse's 'unrecognized arguments' error. Fixes #5387; +53/-0 lines, 2 files, CI green, awaiting maintainer review.

Update history

Date Change
closed
created

Related work

  • Related To: canonical/snapcraft#5387 (confidence 100%)

    This PR targeted #5387, which remains open after the unmerged closure.

Related issues

Issue Project State Summary Similarity
#5387 Warn if `--platform` is used for remote builds snapcraft open Remote-build still rejects removed --platform input without clear migration guidance; triaged issue remains open because PR #6453 was closed unmerged.
79%
#4994 fix(remotebuild): parse '--build-for' and '--platform' snapcraft merged Merged as 5cd480725: remote-build now parses and validates --build-for and --platform, enforces usage restrictions, and updates error and command documentation.
77%
#4881 remote build: fails if `--platform` or `--build-for` are passed with no `platforms` or `architectures` defined snapcraft closed Closed without implementation after CRAFT-3070 recorded the intended scope; no resolving PR or commit was linked.
75%
#5351 fix(remote): error early for invalid platform usage snapcraft merged PR #5351 merged as commit 0c224fc7d, adding an early, friendlier error when --build-for is used with shorthand project platforms instead of failing at Launchpad. Fixes #5270 (CRAFT-4186); restriction later lifted by #5687.
72%
#4990 remote build: Allow comma-separated values for `--build-for` and `--platform` snapcraft closed Regression in remote-build parsing of comma-separated `--build-for`/`--platform` values was restored by merged PR #5028 (commit 189edf429). Maintainer mr-cal closed the issue on 2024-09-13 pointing to #5028.
70%