← Back to issue list

remote build: filter build plan with `--build-for`, drop `--platform`

View original Github issue

Metadata

Project
snapcraft
Number
#4992
Type
issue
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed resolved

Reason: Maintainer mr-cal closed the issue on 2025-01-27 noting it was implemented in PR #5216, which merged as commit 359a364cb. That PR made --build-for filter the lifecycle build plan (behavior 1) and removed --platform until Launchpad fully supports the platforms key.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved 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.
stealth/space-bunny-alpha — closed resolved Merged #5216 (359a364cb): remote-build now filters plans via --build-for for lifecycle metadata; --platform was removed pending fuller Launchpad platforms support. Shipped in 8.7.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #5216 (commit 359a364cb), released in Snapcraft 8.7: remote-build now filters build plans using --build-for, while --platform was removed.
stealth/space-bunny-alpha — closed resolved Implemented in merged PR #5216 (commit 359a364cb, CRAFT-3277): `snapcraft remote-build` now filters the build plan with `--build-for`, and `--platform` was removed. Documented and shipped in snapcraft 8.7.
stealth/space-bunny-alpha — closed resolved Implemented via merged PR #5216 (359a364cb): --build-for now filters lifecycle build plans; --platform was dropped pending fuller Launchpad platforms support.
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.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#5216 (confidence 97%)

    Merged PR 'feat(remotebuild)!: filter build-plan with --build-for, drop --platform' (commit 359a364cb) for CRAFT-3277, closing the issue.

  • Related To: canonical/snapcraft#5687 (confidence 70%)

    Merged follow-up (commit aa2d9ef0d) allowing --build-for with shorthand platform declarations once Launchpad restrictions were lifted.

  • Related To: canonical/snapcraft#6090 (confidence 55%)

    Merged PR (commit 527ff6d2c) improving the legacy remote-builder's --build-for error messaging, building on the #5216 work.

Related issues

Issue Project State Summary Similarity
#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.
91%
#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%