Atomic "move package" operation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Colin Watson | ||
ubuntu-archive-tools |
Fix Released
|
Low
|
Iain Lane |
Bug Description
proposed-migration needs to copy migrateable packages from proposed to release and then delete them from proposed. At present it does this by calling Archive.copyPackage (which schedules an asynchronous copy job) and then if that succeeds it calls SPPH.requestDel
* It is possible for the copy job to succeed but the deletion to time out or similar. In this case we end up with stray publications in -proposed that need to be cleaned up by hand. (This is minor.)
* It is possible, though thankfully rare, for the copy job to fail with an OOPS or similar, but the deletion to succeed. This is bad as it causes the upload to go missing and require manual resurrection. Hopefully somebody will notice ...
* It is possible for the async copy jobs to run after the deletion is processed, and furthermore narrowly possible for the publisher to run in between the deletion and the copy job. In this case everything will sort itself out on the next publisher run, but there will be a window where the upload in question will be missing from both release and proposed pockets in the published archive, causing considerable confusion.
The correct fix for all of these is to have a transactional "move package" operation in Launchpad. I would suggest that it could simply be a move=True keyword argument to Archive.
Related branches
- Tom Wardill (community): Approve
-
Diff: 62 lines (+33/-0)2 files modifiedlib/lp/soyuz/browser/tests/test_archive_webservice.py (+27/-0)
lib/lp/soyuz/interfaces/archive.py (+6/-0)
- Kristian Glass (community): Approve
-
Diff: 808 lines (+312/-50)11 files modifiedlib/lp/code/vocabularies/sourcepackagerecipe.py (+2/-2)
lib/lp/soyuz/browser/archive.py (+2/-11)
lib/lp/soyuz/interfaces/archive.py (+3/-1)
lib/lp/soyuz/interfaces/packagecopyjob.py (+7/-2)
lib/lp/soyuz/model/archive.py (+9/-6)
lib/lp/soyuz/model/packagecopyjob.py (+15/-9)
lib/lp/soyuz/scripts/packagecopier.py (+63/-9)
lib/lp/soyuz/scripts/tests/test_copypackage.py (+44/-0)
lib/lp/soyuz/tests/test_archive.py (+124/-5)
lib/lp/soyuz/tests/test_packagecopyjob.py (+28/-3)
lib/lp/soyuz/vocabularies.py (+15/-2)
Changed in ubuntu-archive-tools: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: | added: package-copies soyuz-core |
Changed in launchpad: | |
status: | Triaged → In Progress |
assignee: | nobody → Colin Watson (cjwatson) |
Almost there, but I forgot to declare "move" as a parameter to Archive.copyPackage in the webservice API, so it isn't usable yet. Oops.