← Back to issue list

feat(remotebuild)!: filter build-plan with --build-for, drop --platform

View original Github issue

Metadata

Project
snapcraft
Number
#5216
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: —

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 `tox run -m lint`? - [x] Have you successfully run `tox run -e test-py310`? (supported versions: `py39`, `py310`, `py311`, `py312`) ----- * Allows using `--build-for` to filter entries in the `architectures` or `platforms` keys in a project file. * For more information on how these arguments operate, see [this section of the documentation](https://canonical-snapcraft--5216.com.readthedocs.build/en/5216/explanation/remote-build/#id1), which is updated by this PR. * Drop the `--platform` argument. For more information, see [this comment](https://github.com/canonical/snapcraft/pull/5216#issuecomment-2613110424). * Catches Launchpad errors, which were percolating up as internal errors. There are still ways for remote builds to fail due to Launchpad's limited processing of the `platforms` key. That is out of scope here. The :tada: passing :tada: remote spread tests are [here](https://github.com/canonical/snapcraft/actions/runs/12960688013/job/36167583889). Fixes #4992 (CRAFT-3277)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — — 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.
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#5216 (359a364cb): remote builds can filter build plans with --build-for; --platform was removed pending fuller Launchpad support. Fixed #4992.
qwen/qwen3.6-35b-a3b — — 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.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Implemented --build-for to filter build-plan entries and removed --platform due to Launchpad API limitations and UX complexity. Fixed internal error propagation for Launchpad failures. Approved after dismissing an unrelated test failure.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4992 remote build: filter build plan with `--build-for`, drop `--platform` snapcraft closed Closed by mr-cal as implemented in merged PR #5216 (commit 359a364cb, CRAFT-3277, snapcraft 8.7): `remote-build` now filters the build plan with --build-for, and --platform was dropped pending Launchpad's full platforms support.
91%
#5111 feat: use `craft-platforms` for build plans snapcraft merged Merged in #5111 via commit 7969ee8d5, replacing Snapcraft’s custom build-plan logic with craft-platforms utilities.
73%
#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%
#4858 remote build: platform definitions cannot be parsed by Launchpad snapcraft closed Launchpad parsing was addressed upstream, and merged PR canonical/snapcraft#4994 (5cd480725) fixed remote-build handling of --platform and --build-for.
72%
#5687 feat(remote): allow using shorthand platforms with --build-for snapcraft merged Merged PR #5687 (commit aa2d9ef0d), enabling --build-for with shorthand platform declarations after Launchpad removed the underlying restrictions.
71%
#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.
71%
#86 feat(project): add support to platforms in build plan craft-application merged Merged #86 added platform-name filtering for build plans, fixing #83; landed as commit e494797a.
71%
#272 feat(platforms): support --build-for to select platform craft-application merged PR #272 (merge commit e99ee656) added --build-for platform selection with build-on/build-for plan filtering and host_arch support in _filter_plan; approved and merged by maintainer syu-w, fixing #254.
71%