canonical / snapcraft

Package, distribute, and update any app for Linux and IoT.
https://snapcraft.io
GNU General Public License v3.0
1.18k stars 443 forks source link

remote build: platform definitions cannot be parsed by Launchpad #4858

Closed mr-cal closed 1 month ago

mr-cal commented 3 months ago

Bug Description

Problem 1

Launchpad fails to parse many platforms definitions.

We need to complete https://github.com/canonical/craft-platforms/issues/5 and sync with the Launchpad team to consume that build planner.

Problem 2

The legacy remote builder would only allow snaps that could build a single artefact on a build-on architecture. That is an architecture could only appear once in all build-on entries.

The new remote builder doesn't restrict this. This is a problem because Launchpad's API appears not to distinguish between build-on and build-for, so it is not clear Snapcraft can request builds.

To Reproduce

snapcraft remote-build --platform amd64

Environment

n/a

snapcraft.yaml

name: remote-build-platforms-error
version: "1.0"
summary: test
description: test
confinement: strict

base: core24

platforms:
  amd64:
    build-on: amd64
  arm64:
    build-on: amd64

parts:
  my-part:
    plugin: nil

Relevant log output

Multiple builds match the current platform.
Recommended resolution: Check the "--platform" and "--build-for" parameters.

Additional context

No response

syncronize-issues-to-jira[bot] commented 3 months ago

Thank you for reporting us your feedback!

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

This message was autogenerated

mr-cal commented 2 months ago

upstream bug: https://bugs.launchpad.net/launchpad/+bug/2072622

mr-cal commented 1 month ago

This is mostly fixed by the upstream bug but https://github.com/canonical/snapcraft/pull/4994 solves scenarios with the --platform argument.