Merge lp:~wgrant/launchpad/archive-defer-deletion into lp:launchpad
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 16499 | ||||||||||||
Proposed branch: | lp:~wgrant/launchpad/archive-defer-deletion | ||||||||||||
Merge into: | lp:launchpad | ||||||||||||
Diff against target: |
324 lines (+110/-52) 7 files modified
lib/lp/archivepublisher/publishing.py (+29/-0) lib/lp/archivepublisher/tests/test_publisher.py (+32/-0) lib/lp/soyuz/doc/archive-deletion.txt (+9/-31) lib/lp/soyuz/interfaces/publishing.py (+5/-3) lib/lp/soyuz/model/archive.py (+13/-10) lib/lp/soyuz/model/publishing.py (+16/-8) lib/lp/soyuz/tests/test_publishing.py (+6/-0) |
||||||||||||
To merge this branch: | bzr merge lp:~wgrant/launchpad/archive-defer-deletion | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Kowalik (community) | code | Approve | |
Review via email: mp+148988@code.launchpad.net |
Commit message
Defer PPA publication deletion to the publisher, remove NBS binaries, and allow files to expire.
Description of the change
This branch fixes three archive deletion bugs.
Firstly, it was marking all publications deleted in the webapp request, which is obviously inappropriate as it's an unbounded number of writes. It's also racy, as the archive is disabled in the same transaction so packages may end up successfully uploading slightly after the other publications are deleted. I moved the publication deletion phase to the publisher. Since we don't have the deletion requester at that point, they're now attributed to the janitor.
Secondly, PPA deletion left BPPHs around if there was no corresponding active SPPH (usually an NBS case). I fixed this by also deleting any remaining binaries.
Thirdly, while the files were removed from disk, dateremoved wasn't being set. This prevents any package published in a deleted archive from ever being expired. I adjusted deletion to also set dateremoved in this case, since we don't need to wait for p-d-r to remove the files.