← Back to issue list

feat(remote-build/legacy): improve error when building with --build-for

View original Github issue

Metadata

Project
snapcraft
Number
#6090
Type
pull request
State
merged
Author
bepri
Labels
Created
Updated
Closed

Current evaluation

Merged improvement to legacy remote builder error messaging for --build-for. Clarifies that --build-on is unsupported and provides actionable guidance, resolving #5817 and superseding #5819.

Suggested action:

No scores available.

Issue body

Due to a limitation of Launchpad's legacy builder service that handles core20 projects, `--build-on` only works if a project is using the shorthand architecture notation. The legacy remote-builder has rejected `--build-on` at least since Snapcraft 4. Modern Snapcraft maps the more recent `--build-for` to `--build-on`, as documented in the legacy remote builder explanation page. This remapping caused a confusing error message previously, saying `--build-on` was the problem regardless of if it was actually used. The error message also did not word the problem in a way that a user could easily correct. This PR preserves the behavior of the legacy remote-builder, but presents a much clearer error message for the problem. <img width="612" height="282" alt="image" src="https://github.com/user-attachments/assets/6c84609a-1bd8-4326-bacd-d00852a0af43" /> Closes #5817. Supersedes #5819. SNAPCRAFT-1283 --- - [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`. - [x] I've added or updated any relevant documentation. - [x] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged improvement to legacy remote builder error messaging for --build-for. Clarifies that --build-on is unsupported and provides actionable guidance, resolving #5817 and superseding #5819.
qwen3.6-35b-a3b-mtp-q6 Merged update improving legacy remote builder error messages when using --build-for. Clarifies the underlying --build-on limitation, replacing confusing output with actionable guidance. Closes #5817, supersedes #5819.
qwen3.6-35b-a3b-mtp-q6 Merged PR improves error messaging for --build-for with Launchpad's legacy remote builder. Clarifies that shorthand architecture notation is required, resolving confusion from automatic remapping to --build-on. Closes #5817 and supersedes #5819.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5819 fix(legacy): accept --build-for on long-form architecture remote build snapcraft closed Superseded by PR #6090. This PR attempted to fix legacy remote build handling of the --build-for flag with long-form architectures. Testing revealed it still failed, so the maintainer closed it in favor of a newer fix.
76%
#5817 Unclear remote build error with ``--build-for`` on core20 snapcraft open core20 remote-build with --build-for and long-form architectures emits a misleading --build-on error. Triaged by maintainers as a likely legacy limitation; addressed in 8.14.4 via PR #6090 which improved the error message.
74%
#5712 remote build: legacy builder should give a friendly error when passing `--project` snapcraft closed Marked as won't fix. The legacy remote builder is being removed in Snapcraft 9, making the requested error message enhancement unnecessary.
72%
#4395 feat(remote-build): new command logic snapcraft merged Merged into main. Introduces a RemoteBuild class to orchestrate remote builds, adds local project directory caching, and implements post-build cache cleanup. Resolves #4324. Approved by three reviewers with passing CI and 97.88% diff coverage.
72%