changes to buildstate strings broke scripts

Bug #559591 reported by Kees Cook
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
New
Undecided
Unassigned

Bug Description

Edge suddenly changed build.buildstate strings for all API versions. This broke security publication scripts.

Was "Successfully built", and is now "Successful build". What other strings have changed, and what is the policy on string contents changing under a given API version?

via: https://api.launchpad.net/1.0/ubuntu/+archive/primary

In [1]: primary.getBuildRecords(source_name='apt', build_state = 'Successfully built')[0]
Out[1]: <build at https://api.launchpad.net/1.0/ubuntu/+source/apt/0.5.27.1/+build/55183>

via: https://api.edge.launchpad.net/1.0/ubuntu/+archive/primary

In [1]: primary.getBuildRecords(source_name='apt', build_state = 'Successfully built')[0]
...
ValueError: Invalid value 'Successfully built' for parameter 'build_state': valid values are: "Pending build", "Successful build", "Failed to build", "Could not build because of missing dependencies", "Could not build because of chroot problem", "Could not build because source package was superseded", "Currently building", "Could not be uploaded correctly"

Tags: lp-soyuz
Revision history for this message
Colin Watson (cjwatson) wrote :

... and why does the API return these human-readable strings rather than some kind of identifier, anyway? If code inside Launchpad isn't comparing against "Successful build", then code outside Launchpad shouldn't have to either ...

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.