remote build: platform definitions cannot be parsed by Launchpad
Metadata
Current evaluation
Launchpad parsing was addressed upstream, and merged PR canonical/snapcraft#4994 (5cd480725) fixed remote-build handling of --platform and --build-for.
Resolution: closed resolved
Reason: The maintainer reported that the upstream Launchpad bug was mostly fixed, while PR #4994 was merged as commit 5cd480725 to resolve remote-build --platform scenarios. The issue was closed after this resolution.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
#### Problem 1
Launchpad fails to parse many `platforms` definitions.
We need to complete https://github.com/canonical/craft-platforms/issues/5 and sync with the Launchpad team to consume that build planner.
#### Problem 2
The legacy remote builder would only allow snaps that could build a single artefact on a `build-on` architecture. That is an architecture could only appear once in all `build-on` entries.
The new remote builder doesn't restrict this. This is a problem because Launchpad's API appears not to distinguish between `build-on` and `build-for`, so it is not clear Snapcraft can request builds.
### To Reproduce
snapcraft remote-build --platform amd64
### Environment
n/a
### snapcraft.yaml
```shell
name: remote-build-platforms-error
version: "1.0"
summary: test
description: test
confinement: strict
base: core24
platforms:
amd64:
build-on: amd64
arm64:
build-on: amd64
parts:
my-part:
plugin: nil
```
### Relevant log output
```shell
Multiple builds match the current platform.
Recommended resolution: Check the "--platform" and "--build-for" parameters.
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Launchpad parsing was addressed upstream, and merged PR canonical/snapcraft#4994 (5cd480725) fixed remote-build handling of --platform and --build-for. | |
| stealth/space-bunny-alpha | — | closed resolved | Launchpad parsing was mostly fixed upstream; Snapcraft #4994 merged as 5cd480725 to handle remote-build --platform scenarios. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed via an upstream Launchpad bug resolution. PR #4994 merged additional --platform argument handling to resolve remaining parsing scenarios. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved by upstream Launchpad bug 2072622. PR 4994 merged to handle --platform argument scenarios, fixing platform definition parsing and remote build conflicts. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by upstream Launchpad bug #2072622 and snapcraft PR #4994, resolving platform parsing failures and --platform argument conflicts during remote builds. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved via upstream Launchpad bug fix and snapcraft pull request 4994, which corrects platform definition parsing and handles --platform argument scenarios for remote builds. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#4994
(confidence 100%)
Merged fix for parsing and validating --platform and --build-for in remote builds.
-
Related To:
canonical/craft-platforms#5
(confidence 95%)
Upstream implementation issue referenced as a dependency in the original report.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #5216 feat(remotebuild)!: filter build-plan with --build-for, drop --platform | snapcraft | merged | Merged as commit 359a364cb (CRAFT-3277): `remote-build` now filters the build plan with `--build-for`, `--platform` was removed, and Launchpad errors are caught instead of surfacing as internal errors. Ships in snapcraft 8.7; closes #4992. | |
| #4996 remote build: fix cross-compiling errors and `build-for: all` errors | snapcraft | closed | Fixed by merged PR canonical/snapcraft#5265 (commit f94da8f13), sending build-on architectures to Launchpad for correct cross-compilation and build-for: all behavior. | |
| #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. | |
| #4780 remote build: fails with some architecture definitions | snapcraft | closed | Remote-build architecture handling was fixed by merged PR canonical/snapcraft#4793 (commit 53ec55cef), with companion support in canonical/craft-application#343. | |
| #4783 remote build: fail if launchpad fails to create artifacts | snapcraft | closed | Remote-build silently succeeded when Launchpad produced no artifacts. Fixed by merged PR #4826 (commit 552897340), which makes snapcraft remote-build fail when no artifacts are created. |