Merge lp:~jelmer/launchpad/128259-async-1 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Jelmer Vernooij on 2010-08-13 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 11399 |
| Proposed branch: | lp:~jelmer/launchpad/128259-async-1 |
| Merge into: | lp:launchpad |
| Prerequisite: | lp:~jelmer/launchpad/refactor-uploadprocessor |
| Diff against target: |
559 lines (+230/-44) 4 files modified
lib/lp/archiveuploader/tests/test_uploadprocessor.py (+112/-7) lib/lp/archiveuploader/uploadpolicy.py (+2/-1) lib/lp/archiveuploader/uploadprocessor.py (+108/-33) lib/lp/soyuz/scripts/soyuz_process_upload.py (+8/-3) |
| To merge this branch: | bzr merge lp:~jelmer/launchpad/128259-async-1 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Abel Deuring (community) | code | 2010-08-12 | Approve on 2010-08-13 |
|
Review via email:
|
|||
Commit Message
Add --builds option to process-upload.
Description of the Change
This branch adds a --builds option to process-upload.
This new option makes process-upload the directory name in which the upload was found as <buildid>
This makes it possible for uploads of builds to no longer happen synchronously inside of the buildd manager, but rather for the buildd manager to move them into a separate queue where they can be processed by a process-upload independently without blocking the buildd manager.
| Paul Hummer (rockstar) wrote : | # |
| Abel Deuring (adeuring) wrote : | # |
Hi Jelmer,
a nice branch! I have just a few formal nitpicks, see below.
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
[...]
> + def testSuccess(self):
> + # Upload a source package
> + upload_dir = self.queueUploa
> + self.processUpl
> + source_pub = self.publishPac
> + [build] = source_
> +
> + # Move the source from the accepted queue.
> + [queue_item] = self.breezy.
> + status=
> + version="1.0-1", name="bar")
> + queue_item.
> +
> + build.jobStarted()
> + build.builder = self.factory.
> +
> + # Upload and accept a binary for the primary archive source.
> + shutil.
> + self.layer.
> + leaf_name = "%d-%d" % (build.id, 60)
> + upload_dir = self.queueUploa
> + queue_entry=
> + self.options.
> + self.options.builds = True
> + self.uploadproc
> + self.layer.
> + self.assertEqua
> + log_lines = build.upload_
> + self.assertTrue(
> + 'INFO: Processing upload bar_1.0-
> + self.assertTrue(
> + 'INFO: Committing the transaction and any mails associated with'
> + 'this upload.')
As already mentioned on IRC, this should be something like
assertTrue(
(And I assume that a ' ' is missing after 'with'.)
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
[...]
> @@ -184,7 +257,8 @@
> for changes_file in changes_files:
> self.log.
> try:
> - result = self.processCha
> + result = self.processCha
> + self.log)
Our style guide says that we should put all parameters into the second
(and following) line if they don't fit completely into the first line.
[...]
> @@ -376,11 +451,11 @@
> except UploadPolicyError, e:
> upload.
> "%s " % e)
> - self.log.
> + logger.
> exc_info=True)
Again, please move all parameters to the second line.
> except FatalUploadError, e:
> ...
| Abel Deuring (adeuring) wrote : | # |
ah, one more detail: line 269 of the diff is
+ self.ztm.commit()
could you add a comment why the commit() call is necessary?

It looks like that there are conflicts with this branch. Could you please resolve them?