Support snapcraft architectures keyword
Bug #1770400 reported by
Evan
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Colin Watson |
Bug Description
Snapcraft now supports specifying what architectures a snap should build for:
https:/
Launchpad should support this (in a manner that build.snapcraft.io can consume).
Originally filed at https:/
Related branches
lp:~cjwatson/launchpad/snap-parse-architectures
- William Grant (community): Approve (code)
-
Diff: 420 lines (+407/-0)2 files modifiedlib/lp/snappy/adapters/buildarch.py (+176/-0)
lib/lp/snappy/adapters/tests/test_buildarch.py (+231/-0)
lp:~cjwatson/launchpad/db-snap-job
- William Grant (community): Approve (db)
- Stuart Bishop: Pending (db) requested
-
Diff: 26 lines (+22/-0)1 file modifieddatabase/schema/patch-2209-83-3.sql (+22/-0)
lp:~cjwatson/launchpad/snap-request-builds-job
- William Grant (community): Approve (code)
-
Diff: 855 lines (+680/-9)9 files modifieddatabase/schema/security.cfg (+15/-2)
lib/lp/services/config/schema-lazr.conf (+6/-0)
lib/lp/snappy/configure.zcml (+13/-1)
lib/lp/snappy/interfaces/snap.py (+15/-0)
lib/lp/snappy/interfaces/snapjob.py (+97/-0)
lib/lp/snappy/model/snap.py (+47/-6)
lib/lp/snappy/model/snapjob.py (+271/-0)
lib/lp/snappy/tests/test_snap.py (+61/-0)
lib/lp/snappy/tests/test_snapjob.py (+155/-0)
lp:~cjwatson/launchpad/snap-request-builds
- William Grant (community): Approve (code)
-
Diff: 603 lines (+357/-4)10 files modifiedlib/lp/security.py (+14/-2)
lib/lp/snappy/browser/configure.zcml (+5/-1)
lib/lp/snappy/browser/snap.py (+8/-0)
lib/lp/snappy/configure.zcml (+7/-0)
lib/lp/snappy/interfaces/snap.py (+92/-0)
lib/lp/snappy/interfaces/snapjob.py (+8/-0)
lib/lp/snappy/interfaces/webservice.py (+7/-1)
lib/lp/snappy/model/snap.py (+52/-0)
lib/lp/snappy/model/snapjob.py (+14/-0)
lib/lp/snappy/tests/test_snap.py (+150/-0)
lp:~cjwatson/launchpad/git-ref-remote-blob
- William Grant (community): Approve (code)
-
Diff: 499 lines (+249/-15)9 files modifiedlib/lp/code/errors.py (+13/-0)
lib/lp/code/interfaces/gitref.py (+8/-1)
lib/lp/code/model/githosting.py (+2/-1)
lib/lp/code/model/gitref.py (+62/-2)
lib/lp/code/model/gitrepository.py (+2/-1)
lib/lp/code/model/tests/test_gitref.py (+110/-2)
lib/lp/snappy/interfaces/snap.py (+4/-0)
lib/lp/snappy/model/snap.py (+15/-6)
lib/lp/snappy/tests/test_snap.py (+33/-2)
lp:~cjwatson/launchpad/snap-daily-builds-request-builds
- William Grant (community): Approve (code)
-
Diff: 353 lines (+128/-54)4 files modifiedlib/lp/snappy/adapters/buildarch.py (+4/-4)
lib/lp/snappy/interfaces/snap.py (+14/-1)
lib/lp/snappy/model/snap.py (+28/-36)
lib/lp/snappy/tests/test_snap.py (+82/-13)
lp:~cjwatson/launchpad/snap-request-builds-ui
- William Grant (community): Approve (code)
-
Diff: 1746 lines (+1034/-232)14 files modifiedlib/lp/app/browser/configure.zcml (+8/-1)
lib/lp/app/browser/tales.py (+35/-1)
lib/lp/snappy/browser/snap.py (+20/-17)
lib/lp/snappy/browser/tests/test_snap.py (+62/-23)
lib/lp/snappy/interfaces/snap.py (+36/-3)
lib/lp/snappy/interfaces/snapjob.py (+21/-0)
lib/lp/snappy/javascript/snap.update_build_statuses.js (+131/-38)
lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.html (+20/-14)
lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.js (+342/-126)
lib/lp/snappy/model/snap.py (+100/-3)
lib/lp/snappy/model/snapjob.py (+62/-4)
lib/lp/snappy/templates/snap-index.pt (+12/-0)
lib/lp/snappy/tests/test_snap.py (+172/-2)
lib/lp/testing/factory.py (+13/-0)
lp:~cjwatson/launchpad/db-snap-build-build-request
- William Grant (community): Approve (db)
- Stuart Bishop: Pending (db) requested
-
Diff: 14 lines (+10/-0)1 file modifieddatabase/schema/patch-2209-83-4.sql (+10/-0)
lp:~cjwatson/launchpad/snap-build-created-webhook
- William Grant (community): Approve (code)
-
Diff: 498 lines (+152/-30)12 files modifiedlib/lp/snappy/configure.zcml (+4/-0)
lib/lp/snappy/interfaces/snap.py (+6/-2)
lib/lp/snappy/interfaces/snapbuild.py (+9/-1)
lib/lp/snappy/interfaces/snapjob.py (+8/-1)
lib/lp/snappy/model/snap.py (+7/-4)
lib/lp/snappy/model/snapbuild.py (+13/-3)
lib/lp/snappy/model/snapjob.py (+6/-1)
lib/lp/snappy/subscribers/snapbuild.py (+12/-6)
lib/lp/snappy/tests/test_snap.py (+73/-4)
lib/lp/snappy/tests/test_snapbuild.py (+3/-0)
lib/lp/snappy/tests/test_snapbuildjob.py (+3/-1)
lib/lp/snappy/tests/test_snapjob.py (+8/-7)
lp:~cjwatson/launchpad/snap-build-request-date-attrs
- William Grant (community): Approve (code)
-
Diff: 309 lines (+94/-1)6 files modifiedlib/lp/snappy/interfaces/snap.py (+8/-0)
lib/lp/snappy/interfaces/snapjob.py (+9/-0)
lib/lp/snappy/model/snap.py (+10/-0)
lib/lp/snappy/model/snapjob.py (+10/-0)
lib/lp/snappy/tests/test_snap.py (+42/-1)
lib/lp/snappy/tests/test_snapjob.py (+15/-0)
lp:~cjwatson/launchpad/snap-failed-build-requests
- William Grant (community): Approve (code)
-
Diff: 745 lines (+250/-92)15 files modifiedlib/lp/code/browser/tests/test_branchmergeproposal.py (+3/-4)
lib/lp/code/browser/tests/test_gitref.py (+3/-3)
lib/lp/code/model/gitref.py (+3/-4)
lib/lp/code/model/tests/test_gitjob.py (+4/-4)
lib/lp/code/model/tests/test_gitref.py (+5/-5)
lib/lp/code/model/tests/test_gitrepository.py (+4/-4)
lib/lp/code/stories/branches/xx-code-review-comments.txt (+3/-3)
lib/lp/services/tests/test_utils.py (+13/-0)
lib/lp/services/utils.py (+9/-0)
lib/lp/snappy/browser/snap.py (+41/-15)
lib/lp/snappy/browser/tests/test_snap.py (+92/-6)
lib/lp/snappy/interfaces/snap.py (+5/-0)
lib/lp/snappy/model/snap.py (+11/-1)
lib/lp/snappy/templates/snap-index.pt (+53/-42)
lib/lp/snappy/tests/test_snap.py (+1/-1)
description: | updated |
Changed in launchpad: | |
status: | Triaged → In Progress |
assignee: | nobody → Colin Watson (cjwatson) |
tags: |
added: qa-ok removed: qa-needstesting |
tags: |
added: qa-ok removed: qa-needstesting |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.)
"""