recipe build for removed recipe triggers uploader exception

Bug #698032 reported by Jelmer Vernooij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Ian Booth

Bug Description

When a recipe build has been removed since a recipe build was started the archive uploader will fall over:

OOPS-1832FTPMASTER446

Traceback (most recent call last):
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/services/scripts/base.py", line 91, in log_unhandled_exceptions_func
    return func(self, *args, **kw)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/services/scripts/base.py", line 353, in lock_and_run
    implicit_begin=implicit_begin, isolation=isolation)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/services/scripts/base.py", line 91, in log_unhandled_exceptions_func
    return func(self, *args, **kw)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/services/scripts/base.py", line 311, in run
    self.main()
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/soyuz/scripts/soyuz_process_upload.py", line 93, in main
    processor.processUploadQueue(self.options.leafname)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/archiveuploader/uploadprocessor.py", line 196, in processUploadQueue
    self.processBuildUpload(fsroot, upload)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/archiveuploader/uploadprocessor.py", line 257, in processBuildUpload
    build.notify(extra_info="Uploading build %s failed." % upload)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/code/model/sourcepackagerecipebuild.py", line 280, in notify
    mailer.sendAll()
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/services/mail/basemailer.py", line 151, in sendAll
    ctrl = self.generateEmail(email, recipient)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/services/mail/basemailer.py", line 76, in generateEmail
    subject = self._getSubject(email)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/services/mail/basemailer.py", line 91, in _getSubject
    return self._subject_template % self._getTemplateParams(email)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-12161/lib/lp/code/mail/sourcepackagerecipebuild.py", line 60, in _getTemplateParams
    'recipe': self.build.recipe.name,
AttributeError: 'NoneType' object has no attribute 'name'

It should explicitly check if the recipe still exists, and otherwise discard the build.

Related branches

Jelmer Vernooij (jelmer)
summary: - recipe build for removed recipe trigger upload error
+ recipe build for removed recipe triggers uploader exception
Changed in launchpad:
status: New → Triaged
importance: Undecided → High
tags: added: oops
tags: added: recipe
removed: oops
tags: added: oops
description: updated
Changed in launchpad:
importance: High → Critical
Ian Booth (wallyworld)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Ian Booth (wallyworld)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.02
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.