edit snap package page should have a default for " Source archive for automatic builds:"

Bug #1793311 reported by Ian Johnson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
New
Undecided
Unassigned

Bug Description

When editing a snap package that has never had automatic builds enabled before (the UI checkbox for "Automatically build when branch changes" is off), when enabling that there is no default for "Source archive for automatic builds".

Either there should be a default for this (which would make sense as the UI element are radio buttons), or there should be a form validation error when submitting it with this value empty.

Currently, via the UI attempting to save without choosing a value manually for "Source archive for automatic builds" results in an "Uh oh" page with the following technical reason:

"Technically, the load balancer took too long to connect to an application server."

When using lp-shell to attempt to edit the package, instead a 500 server error appears:

>>> snap = lp.load('/~docker/+snap/docker')
>>> snap.auto_build = True
>>> snap
<snap at https://api.launchpad.net/devel/~docker/+snap/docker>
>>> snap.lp_save()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 776, in lp_save
    URI(self.self_link), representation, headers)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 489, in patch
    'PATCH', extra_headers=extra_headers)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 431, in _request
    raise error
ServerError: HTTP Error 500: Internal Server Error
Response headers:
---
connection: close
content-length: 14
content-type: text/plain
date: Wed, 19 Sep 2018 13:21:53 GMT
server: zope.server.http (HTTP)
status: 500
x-lazr-oopsid: OOPS-db2a7493cde4157b19ac6c18178254c8
x-powered-by: Zope (www.zope.org), Python (www.python.org)
---
Response body:
---
IntegrityError
---

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.