Error 400 (Bad request) when using "ppa wait"

Bug #1997122 reported by Sergio Durigan Junior
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ppa-dev-tools
Triaged
Undecided
Unassigned

Bug Description

Hi Bryce,

I was using "ppa wait" today in order to gate a mass-upload to a PPA and it crashed on me:

$ ppa wait ppa:ci-train-ppa-service/4959 && ./upload-ppa.sh
* Still waiting on 4 build publications:
  - slapi-dev 2.6.3+dfsg-1~exp1ubuntu1 in lunar riscv64
  - slapi-dev 2.6.3+dfsg-1~exp1ubuntu1 in lunar arm64
  - slapi-dev 2.6.3+dfsg-1~exp1ubuntu1 in lunar armhf
  - slapi-dev 2.6.3+dfsg-1~exp1ubuntu1 in lunar s390x

* Still waiting on 4 build publications:
  - slapi-dev 2.6.3+dfsg-1~exp1ubuntu1 in lunar riscv64
  - slapi-dev 2.6.3+dfsg-1~exp1ubuntu1 in lunar arm64
  - slapi-dev 2.6.3+dfsg-1~exp1ubuntu1 in lunar armhf
  - slapi-dev 2.6.3+dfsg-1~exp1ubuntu1 in lunar s390x

Traceback (most recent call last):
  File "/usr/bin/ppa", line 740, in <module>
    retval = main(args)
  File "/usr/bin/ppa", line 729, in main
    return func(lp, config)
  File "/usr/bin/ppa", line 567, in command_wait
    waiting = ppa.has_pending_publications()
  File "/usr/lib/python3/dist-packages/ppa/ppa.py", line 291, in has_pending_publications
    for binary_publication in self.get_binaries():
  File "/usr/lib/python3/dist-packages/ppa/ppa.py", line 214, in get_binaries
    return self.archive.getPublishedBinaries()
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 592, in __call__
    response, content = self.root._browser._request(
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 429, in _request
    raise error
lazr.restfulclient.errors.BadRequest: HTTP Error 400: Bad request
Response headers:
---
-content-encoding: gzip
cache-control: no-cache
connection: close
content-length: 90
content-type: text/html
date: Fri, 18 Nov 2022 22:23:39 GMT
server: Apache/2.4.18 (Ubuntu)
status: 400
vary: Accept-Encoding
---
Response body:
---
b'<html><body><h1>400 Bad request</h1>\nYour browser sent an invalid request.\n</body></html>\n'
---

I haven't tried reproducing it yet (busy with other stuff), but I can try gathering more info if needed.

Thanks!

summary: - Crash when using "ppa wait"
+ Error 400 (Bad request) when using "ppa wait"
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks Sergio,

Since the call to getPublishedBinaries() carried no input parameters, initial guess would be some sort of temporary load/resource issue on the Launchpad service side. If that's true, it's unlikely you'll reproduce this (except when LP is in the same bad state), and I just need to trap the exception.

If you do happen to reproduce it, one thing to look at would be the state of your builds in the PPA. Sometimes there are unexpected status text values or whatnot. I'll dig through the code at some point and try to see if I missed something.

Thanks for reporting the bug!

Changed in ppa-dev-tools:
status: New → Triaged
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.