remote build: filter build plan with `--build-for`, drop `--platform`
Metadata
Current evaluation
Resolved via PR #5216. Implemented --build-for filtering for remote build plans. The --platform flag was dropped pending full Launchpad support for the platforms key.
Suggested action: —
No scores available.
Issue body
### What needs to get done
Today, only behavior 2 is supported. We need to support both behaviors. There will be many scenarios where behavior 1 will not work as-expected until Launchpad uses craft-platforms to generate build plans, but simple `platforms` definitions should work.
##### Behavior 1: Lifecycle command
If there is a `platform` or `architectures` definition in the project metadata, `--platform` or `--build-for` should filter down the build plan.
##### Behavior 2: Legacy remote builder
If there is not a `platforms` or `architectures` definition in the project metadata, `--platform` or `--build-for` should define the build-for architectures for Launchpad to build.
### Why it needs to get done
To improve the usability of the remote-builder.
A reoccurring complaint is that the project metadata must be edited to remote-build for a single architecture.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Resolved via PR #5216. Implemented --build-for filtering for remote build plans. The --platform flag was dropped pending full Launchpad support for the platforms key. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved in PR #5216 by implementing build plan filtering via --build-for. The --platform flag was removed pending full Launchpad support for the platforms key, fulfilling the remote builder usability requirements. | |
| qwen/qwen3.6-35b-a3b | — | — | Implemented in PR #5216. The --build-for flag now filters the remote build plan. The --platform flag was removed from snapcraft remote-build until Launchpad fully supports the platforms key. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved via PR 5216. The --platform flag was removed from snapcraft remote-build pending Launchpad support for the platforms key. Build plan filtering now uses --build-for. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Implemented in PR #5216. Added --build-for filtering for remote build plans and dropped the --platform flag until Launchpad supports the platforms key. Closed as resolved. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5216 feat(remotebuild)!: filter build-plan with --build-for, drop --platform | snapcraft | merged | Merged after review and passing CI. Introduces --build-for to filter build plans, removes --platform due to Launchpad API limitations, and improves error handling. Resolves #4992. | |
| #272 feat(platforms): support --build-for to select platform | craft-application | merged | Merged to add --build-for flag for platform selection and update _filter_plan API with host_arch parameter for remote builds. Approved by two reviewers, passed CI, and resolves issue #254. | |
| #355 Allow filtering platforms to build-for | rockcraft | closed | Adding a --platform flag for build target filtering was closed without implementation or discussion. The request was abandoned. | |
| #86 feat(project): add support to platforms in build plan | craft-application | merged | Implemented generic platform name filtering for build plans, resolving issue #83. Merged after reviewer approval and passing CI checks with 100% diff coverage. |