← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/redirect-release-uploads into lp:launchpad

 

The proposal to merge lp:~cjwatson/launchpad/redirect-release-uploads into lp:launchpad has been updated.

Description changed to:

== Summary ==

''Summarise the problem that you're solving.''

Bug 1068071: To make raring more continuously usable, UE wants to land all uploads in raring-proposed and promote them automatically to raring following tests somewhat akin to those used by Debian's testing suite, in what amounts to a continuous integration system.  We'll operate the automation, but its usefulness will be significantly enhanced by redirecting uploads automatically from raring to raring-proposed.

== Proposed fix ==

A new Distribution.redirect_release_uploads column is making its way through buildbot/QA as I type this.  If it's set, then:

 * Automatically rewrite source uploads from RELEASE to PROPOSED in archiveuploader, adding a note to acceptance mails that this has happened.
 * Forbid copies into the RELEASE pocket, except for queue admins (if nothing else, such copies are used by the automation itself).

== Pre-implementation notes ==

Extensive discussions on #ubuntu-release over the last week or so.  I was going to automatically rewrite some copies as well, but William convinced me that this was excessively magical and complicated the API in ways that would be troublesome in future.  We'll probably end up SRUing syncpackage instead.

== Implementation details ==

The insecure upload policy seemed a sensible place to do redirects, but it does have the slight problem that setDistroSeriesAndPocket is sometimes called before we have a NascentUpload to add warnings to.  I ended up stashing the warning temporarily in policy.redirect_warning, which is a little bit of a kludge.

This causes acceptance mails to have some extra bits (exemplified by the changes to nascentupload-announcements.txt) due to the normal contents of %(SUMMARY)s.  I don't think this is a problem.

The copy restriction seemed most naturally done in checkUploadToPocket, although that needs to be guarded by a check_redirect=False parameter because that method is also called for build uploads which must not be redirected.  A couple of places were doing their own checks for copies into the RELEASE pocket of PPAs; I couldn't see any reason why these wouldn't also want all the other checks in checkUploadToPocket - indeed, copies into the pockets forbidden there will generally cause publisher badness - other than making sure that they raised the correct exception type, so I rewrote these in terms of that method.

== LOC Rationale ==

+148.  This seems cheap at the price for what should be a major improvement in the ongoing stability of Ubuntu.  I have about 5600 lines of credit to help absorb this, and still have some more refactoring work to come.

== Tests ==

Probably wants the whole test suite, but in particular:

  bin/test -vvct archiveuploader -t soyuz

== Demo and Q/A ==

Flip the switch on dogfood, upload source to the RELEASE pocket, whatever its current development series is, check that it goes to PROPOSED, check that a non-queue-admin can't copy it into RELEASE, and check that a queue admin can.

== Lint ==

Pre-existing / false positives:

./lib/lp/archiveuploader/tests/nascentupload-announcements.txt
     186: want exceeds 78 characters.
     187: want exceeds 78 characters.
     660: want exceeds 78 characters.
     727: want exceeds 78 characters.
     729: want exceeds 78 characters.
     780: want exceeds 78 characters.
     782: want exceeds 78 characters.
./lib/lp/soyuz/emailtemplates/upload-accepted.txt
      14: Line has trailing whitespace.
./lib/lp/soyuz/scripts/packagecopier.py
      50: E302 expected 2 blank lines, found 1

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/redirect-release-uploads/+merge/131155
-- 
https://code.launchpad.net/~cjwatson/launchpad/redirect-release-uploads/+merge/131155
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/redirect-release-uploads into lp:launchpad.


References