Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote build: fail if launchpad fails to create artifacts #4783

Closed
mr-cal opened this issue May 1, 2024 · 2 comments
Closed

remote build: fail if launchpad fails to create artifacts #4783

mr-cal opened this issue May 1, 2024 · 2 comments
Labels
bug Actual bad behavior that don't fall into maintenance or documentation triaged

Comments

@mr-cal
Copy link
Collaborator

mr-cal commented May 1, 2024

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), 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

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:

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:

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

@mr-cal mr-cal added the bug Actual bad behavior that don't fall into maintenance or documentation label May 1, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2871.

This message was autogenerated

@mr-cal
Copy link
Collaborator Author

mr-cal commented Jun 3, 2024

Fixed via #4826

@mr-cal mr-cal closed this as completed Jun 3, 2024
@mr-cal mr-cal added the triaged label Aug 21, 2024
@mr-cal mr-cal changed the title New remote builder does not fail if launchpad fails to create artifacts remote build: fail if launchpad fails to create artifacts Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Actual bad behavior that don't fall into maintenance or documentation triaged
Projects
None yet
Development

No branches or pull requests

1 participant