← Back to issue list

remote build: fail if launchpad fails to create artifacts

View original Github issue

Metadata

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

Current evaluation

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.

Resolution: closed resolved

Reason: PR #4826 "fix(remote-build): fail if no artifacts are created" was merged as commit 552897340 and closes #4783; the maintainer (mr-cal) commented "Fixed via #4826" before closing.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description If architectures are defined in a snapcraft.yaml file and provided with `--build-for`, launchpad will fail to create artifacts but snapcraft will exit successfully with no error messages. Defining architectures in a snapcraft.yaml file and providing `--build-for` is a known issue ([LP#1885150](https://bugs.launchpad.net/snapcraft/+bug/1885150)), but this bug report is about the UX - there is no validation, warning, or error message. ### Possible solutions - Warn if architectures are defined in a snapcraft.yaml and provided as a build argument - Error if no artifacts are produced - Work with the launchpad team to improve how builds are planned ### To Reproduce `snapcraft remote-build --launchpad-accept-public-upload --verbosity=trace --build-for arm64` ### Environment n/a ### snapcraft.yaml ```shell name: hello-world title: test summary: test description: test version: 7.6.0 base: core22 grade: stable confinement: strict compression: lzo architectures: - amd64 - arm64 parts: my-part: plugin: nil ``` ### Relevant log output #### remote-build logs: ```shell 2024-05-01 16:51:12.860 remote: Resolving deltas: 82% (437/527) 2024-05-01 16:51:12.860 remote: Resolving deltas: 100% (527/527) 2024-05-01 16:51:12.861 remote: Resolving deltas: 100% (527/527), done. 2024-05-01 16:51:14.239 Trying to create snap recipe 'snapcraft-hello-world-15700e74b7e84ef8caaf7accd3dc4ee0' (attempt 1/4) 2024-05-01 16:51:15.502 Monitoring build 2024-05-01 16:51:15.698 Stopped: arm64 2024-05-01 16:51:46.147 Building: arm64 / (30.4s) 2024-05-01 16:51:46.147 Building: arm64 / (60.8s) 2024-05-01 16:51:46.147 Building: arm64 \ (91.5s) 2024-05-01 16:51:46.147 Building: arm64 | (122.0s) 2024-05-01 16:51:46.147 Building: arm64 | (152.5s) 2024-05-01 16:51:46.147 Building: arm64 \ (184.5s) 2024-05-01 16:51:46.147 Building: arm64 \ (214.9s) 2024-05-01 16:51:46.147 Building: arm64 - (245.3s) 2024-05-01 16:51:46.147 Building: arm64 \ (275.8s) 2024-05-01 16:51:46.147 Building: arm64 2024-05-01 16:56:52.515 Uploading: arm64 2024-05-01 16:57:23.036 Stopped: arm64 2024-05-01 16:57:23.037 Fetching 1 build logs... 2024-05-01 16:57:24.112 Downloading https://launchpad.net/~mr-cal/mr-cal-craft-remote-build/+snap/snapcraft-hello-world-15700e74b7e84ef8caaf7accd3dc4ee0/+build/2469914/+files/buildlog_snap_ubuntu_jammy_arm64_snapcraft-hello-world-15700e74b7e84ef8caaf7accd3dc4ee0_BUILDING.txt.gz (--->) 2024-05-01 16:57:24.186 Downloading https://launchpad.net/~mr-cal/mr-cal-craft-remote-build/+snap/snapcraft-hello-world-15700e74b7e84ef8caaf7accd3dc4ee0/+build/2469914/+files/buildlog_snap_ubuntu_jammy_arm64_snapcraft-hello-world-15700e74b7e84ef8caaf7accd3dc4ee0_BUILDING.txt.gz (<---) 2024-05-01 16:57:24.187 Fetching build artifacts... Build completed. Log files: hello_arm64-2024-05-01T16:57:23.txt Artifacts: 2024-05-01 16:57:24.372 Cleaning up ``` #### launchpad logs: ```shell 2024-05-01T21:55:07Z INFO Waiting for automatic snapd restart... snapcraft 8.2.1 from Canonical** installed Running repo phase... Cloning into 'snapcraft-hello-world-15700e74b7e84ef8caaf7accd3dc4ee0'... [01/May/2024:21:55:42 +0000] "CONNECT git.launchpad.net:443 HTTP/1.1" 200 360884 "-" "git/2.34.1" Running pull phase... Initializing parts lifecycle Installing build-packages Installing build-snaps Pulling my-part Running build phase... Could not make build plan: build-on architectures in snapcraft.yaml does not match host architecture (arm64). Revoking proxy token... RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=jammy --arch=arm64 SNAPBUILD-2469914 Scanning for processes to kill in build SNAPBUILD-2469914 ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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.
stealth/space-bunny-alpha — closed resolved Remote-build now fails when Launchpad produces no artifacts. Fixed by merged PR #4826 (552897340), closing #4783.
qwen/qwen3.6-35b-a3b — — Fixed via #4826. Snapcraft remote-build now exits with an error when Launchpad fails to produce artifacts due to architecture mismatches, replacing the previous silent success with explicit failure reporting and validation.
qwen/qwen3.6-35b-a3b — — Fixed via #4826 by implementing validation to fail the remote build when Launchpad fails to create artifacts, preventing silent success exits on architecture mismatches.
qwen/qwen3.6-35b-a3b — — Fixed via PR #4826 by adding validation to fail the remote build when Launchpad produces no artifacts, resolving the silent success issue caused by architecture mismatches.
qwen3.6-35b-a3b-mtp-q6 — — Fixed via PR #4826. Snapcraft now exits with an error when Launchpad remote builds fail to produce artifacts, resolving the silent success issue caused by architecture mismatches.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#4826 (confidence 98%)

    Merged PR/commit 552897340 adds an error when Launchpad returns no artifacts for a remote build.

Related issues

Issue Project State Summary Similarity
#4826 fix(remote-build): fail if no artifacts are created snapcraft merged Merged in #4826 (commit 552897340): remote-build now fails when Launchpad creates no artifacts, fixing #4783.
87%
#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.
86%
#4142 snapcraft remote-build exits with return code 0 even when some snaps failed to build for a given arch snapcraft closed Closed without a documented fix; later #4826 (552897340) only made remote-build fail when no artifacts were produced, not when some architecture builds failed.
75%
#2642 remote-build: detect early build errors snapcraft merged 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.
74%
#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.
74%
#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.
71%
#1852482 snapcraft remote-build for a non-existent user gives me a 500 error snapcraft (launchpad) closed Resolved by merged PR #2825, which removed --launchpad-user and derives the username from the authenticated Launchpad session; included in Snapcraft 3.10.
71%
#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.
70%