launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01430
[Merge] lp:~jelmer/launchpad/653720-failedtoupload into lp:launchpad/devel
Jelmer Vernooij has proposed merging lp:~jelmer/launchpad/653720-failedtoupload into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers): code
commit() after the build status is being set to FAILEDTOUPLOAD in the upload processor.
At the moment there is no commit so the build status doesn't make it to the database since the uploadprocessor aborts any pending transactions. This means that any failed uploads will be stuck in UPLOADING status even though they have already failed.
--
https://code.launchpad.net/~jelmer/launchpad/653720-failedtoupload/+merge/37833
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jelmer/launchpad/653720-failedtoupload into lp:launchpad/devel.
=== modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_uploadprocessor.py 2010-10-04 19:50:45 +0000
+++ lib/lp/archiveuploader/tests/test_uploadprocessor.py 2010-10-07 09:56:18 +0000
@@ -1919,7 +1919,6 @@
self.uploadprocessor.processBuildUpload(
self.incoming_folder, leaf_name)
self.assertEquals(1, len(self.oopses))
- self.layer.txn.commit()
self.assertEquals(
BuildStatus.FAILEDTOUPLOAD, build.status)
self.assertEquals(builder, build.builder)
=== modified file 'lib/lp/archiveuploader/uploadprocessor.py'
--- lib/lp/archiveuploader/uploadprocessor.py 2010-09-16 13:37:25 +0000
+++ lib/lp/archiveuploader/uploadprocessor.py 2010-10-07 09:56:18 +0000
@@ -232,8 +232,7 @@
try:
[changes_file] = self.locateChangesFiles(upload_path)
logger.debug("Considering changefile %s" % changes_file)
- result = self.processChangesFile(
- upload_path, changes_file, logger, build)
+ result = self.processChangesFile(upload_path, changes_file, logger, build)
except (KeyboardInterrupt, SystemExit):
raise
except:
@@ -258,6 +257,7 @@
build.status = BuildStatus.FAILEDTOUPLOAD
build.notify(extra_info="Uploading build %s failed." % upload)
build.storeUploadLog(logger.buffer.getvalue())
+ self.ztm.commit()
def processUpload(self, fsroot, upload):
"""Process an upload's changes files, and move it to a new directory.
@@ -279,8 +279,7 @@
for changes_file in changes_files:
self.log.debug("Considering changefile %s" % changes_file)
try:
- result = self.processChangesFile(
- upload_path, changes_file, self.log)
+ result = self.processChangesFile(upload_path, changes_file, self.log)
if result == UploadStatusEnum.FAILED:
some_failed = True
elif result == UploadStatusEnum.REJECTED: