remote-build: detect early build errors
Metadata
Current evaluation
Merged PR #2642 by cjp256: remote-build now detects early Launchpad build errors (e.g. missing snapcraft.yaml) instead of misreporting a busy builder; landed as commit 73fd95e86.
Resolution: closed resolved
Reason: The pull request was approved and merged into the remote-build branch as commit 73fd95e86 ("remote-build: detect early build errors (#2642)"). The change adds checks for builder status messages so the actual Launchpad error text is surfaced rather than assuming the builder is busy.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The easiest-to-reproduce example I have come across is to simply
ship the build repository to launchpad without a snapcraft.yaml. In
this case, snapcraft now fails with the following message from launchpad:
```
Sorry, an error occurred in Snapcraft:
Remote builder failed with error: 'Cannot find snapcraft.yaml in
https://cjp256@git.launchpad.net/~cjp256/+git/snapcraft-6cf35d52abc44b19a021b100cb883c8a/ master'
```
The original assumption was that the builder was busy, but now we can
determine if that's the case by checking if status is still "Pending".
It's seemingly quite rare (if ever?) to have the timeout condition hit,
but this commit maintains the checks should it happen:
```
Sorry, an error occurred in Snapcraft:
Remote builder failed with error: 'Timeout exceeded waiting for builder
to become ready.'
```
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2642 by cjp256: remote-build now detects early Launchpad build errors (e.g. missing snapcraft.yaml) instead of misreporting a busy builder; landed as commit 73fd95e86. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2642 as 73fd95e86: remote builds now detect early Launchpad errors, including missing snapcraft.yaml, instead of assuming the builder is busy. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2642 (73fd95e86) to detect early Launchpad build errors, including missing snapcraft.yaml, while preserving pending-builder and timeout handling. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2642, adding early remote-build error detection while preserving timeout handling, in commit 73fd95e86. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Improved remote build error detection to distinguish between pending builders and actual failures like missing config or timeouts. Approved by reviewer, passed CI, and modified 3 files (+131/-47 lines). Minor import fix applied. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix detecting early remote build errors by checking builder status instead of assuming it is busy. Timeout logic is preserved. Author addressed a minor unused import prior to merge. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #4481 Clean Launchpad repositories when remote-build errors are raised | snapcraft | closed | Launchpad cleanup for remote-build errors was implemented in commit 663dcdfab; the author confirmed the request was completed. | |
| #4892 fix(remotebuild): use legacy launchpad credentials if they exist | snapcraft | merged | Merged in snapcraft#4892 as c1c70a249, adding legacy Launchpad credential fallback, build-for: all support, and expanded remote-build tests; fixes #4889. | |
| #5080 `snapcraft remote-build` succeeds even if the build fails | snapcraft | closed | Fixed in Snapcraft 8 by PR #4826 (commit 552897340), which makes remote-build fail when Launchpad produces no artifacts. | |
| #3021 remote-build: remove artifact sanity check | snapcraft | merged | Merged PR #3021 (commit e4a878561) removed remote-build's artifact arch sanity check, so Launchpad results with arch 'multi' from build-on are downloaded instead of rejected. Fixes LP bug #1870730. | |
| #2768 remote-build: autorecovery | snapcraft | merged | PR #2768 by cjp256 added autorecovery for `snapcraft remote-build` (retry/poll recovery of failed Launchpad builds), approved and merged as commit 0077d8265. | |
| #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. | |
| #5960 remote build: internal error when build is cancelled on launchpad | snapcraft | open | remote-build crashes with internal error MissingSchema when a build is cancelled on Launchpad (build_log_url is the string "None"); acknowledged by mr-cal, tracked upstream in craft-application#996 and Jira SNAPCRAFT-1281, still unfixed. |