Comment 11 for bug 438671

Revision history for this message
Abel Deuring (adeuring) wrote : Re: [Bug 438671] Re: HWSubmissionMissingFields OOPS on +hwdb/+submit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27.10.2009 15:37, Marc Tardif wrote:
> If I understand correctly, it would be desirable to add client side
> validation of the form before submitting to Launchpad. This would be

Right. It is up to you, but considering that Launchpad receives 10 or 20
POSTs per day, I think it makes sense at least to see if self._form
looks complete before launchpad_exchange() starts the POST request.

> quite easy to implement using the concept of properties already
> available in Checkbox. I have pushed a preliminary branch for your
> review to make sure that the field requirements are set properly, it
> seems that only field.live_cd is optional. Let me know what you think

no, each field is required, including field.live_cd.

> and whether this fix should be adequate to close this bug.
>

Well, if you are sure that you found the cause of the problem, let's
close the bug. We can later check if OOPSes we see in the future only
come from "sufficiently old" versions of checkbox.

But there is another point, perhaps for another bug: Several things can
go wrong, when checkbox issues its POST to Launchpad, see the doc test I
mentioned earlier for details. For example, checkbox might use a
submission_key value that is already used in the database. Admittedly,
this is not very likely, but not impossible.

I think it would be good if launchpad_exchange() checked the value of
the X-Launchpad-Hwdb-Submission header in order to see if the POST was
successful. (Note that the HTTP status code is always 200, even if LP
rejects the submitted data.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFK5yLIekBPhm8NrtARAjIMAJ4sSzxWxjFu6P4ucVauzIKr1++UZgCffuAz
BD1ovA76hzPnKxDLzL3YqWQ=
=jhNJ
-----END PGP SIGNATURE-----