Support snapcraft architectures keyword

Bug #1770400 reported by Evan on 2018-05-10
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
High
Colin Watson

Bug Description

Snapcraft now supports specifying what architectures a snap should build for:
https://forum.snapcraft.io/t/architectures/4972

Launchpad should support this (in a manner that build.snapcraft.io can consume).

Originally filed at https://github.com/canonical-websites/build.snapcraft.io/issues/556

Related branches

Evan (ev) on 2018-05-10
description: updated
Colin Watson (cjwatson) wrote :

Thanks for filing this. I'm currently waiting for the snapcraft team to send me back the core logic we need to integrate into the Launchpad build manager for this (subject "snapcraft architectures and LP", last email in thread sent 2018-05-03). Quoting the top of that thread:

"""
Perhaps the most economical approach to getting this implemented would be for somebody on the snapcraft side to give us a suitable implementation of a function that has a signature something like this:

  def determine_architectures_to_build(snapcraft_yaml, allowed_arches):
      """Return architectures to build.

      :param snapcraft_yaml: The contents of the snapcraft.yaml file, as
          a string.
      :param allowed_arches: An ordered list of all architecture tags
          that we can create builds for. In cases where any one of
          several build architectures might be suitable, we pick the
          earliest in this list.
      :return: A dict mapping architecture tags to an ignore flag for
          each build that should be created; if the ignore flag is true,
          then the build for that architecture should not cause the
          whole build set to fail.
      """

This is roughly patterned after a similar bit of code we have for .deb builds.

That's the bit that most needs input from the snapcraft team. We could then do the integration with LP on our side, since that will involve a good deal of specialist knowledge of our data model. Does that sound reasonable?

(We're missing other things that would be needed for build sets to work, but we might as well start laying the groundwork for them here.)
"""

Changed in launchpad:
status: New → Triaged
importance: Undecided → High
tags: added: buildd-manager feature lp-snappy
tags: added: api
Colin Watson (cjwatson) on 2018-05-17
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Colin Watson (cjwatson)
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Colin Watson (cjwatson) wrote :

2018-06-21 17:34:54,935 INFO 2209-83-3 applied just now in 0.1 seconds

tags: added: qa-ok
removed: qa-needstesting
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
Colin Watson (cjwatson) wrote :

This first code branch just adds a not-yet-used adapter, so is trivially OK to deploy.

tags: added: qa-ok
removed: qa-needstesting
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
Launchpad QA Bot (lpqabot) wrote :
Launchpad QA Bot (lpqabot) wrote :
Colin Watson (cjwatson) on 2018-07-13
tags: added: qa-ok
removed: qa-needstesting
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
Launchpad QA Bot (lpqabot) wrote :
Launchpad QA Bot (lpqabot) wrote :
Colin Watson (cjwatson) wrote :

r18740 and r18746 seem OK on dogfood, and r13924 applied fine on staging:

2018-08-07 19:34:07,811 INFO 2209-83-4 applied just now in 0.1 seconds

tags: added: qa-ok
removed: qa-needstesting
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
Colin Watson (cjwatson) on 2018-09-11
tags: added: qa-ok
removed: qa-needstesting
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson) on 2018-09-14
tags: added: qa-ok
removed: qa-needstesting
Colin Watson (cjwatson) wrote :

The Launchpad side of this is complete and on production now. I'm going to leave this bug open until I get the build.snapcraft.io side of it done, since it's possible there'll be some further unforeseen problems.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers