Async uploader sends recipe mail as if it were source package uploads

Bug #681125 reported by Aaron Bentley
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

When a source package recipe upload fails, an incorrect email is sent, as if the upload were from a user upload, not a recipe build. Additionally, a correct email is sent.

When an async upload succeeds, an ACCEPTED message is sent, instead of a recipe build success message.

Tags: lp-code recipe

Related branches

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
assignee: nobody → Aaron Bentley (abentley)
milestone: none → 11.02
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → Fix Committed
Revision history for this message
Aaron Bentley (abentley) wrote :

The success emails are now correct, but it's still sending a "rejected" message on failure.

tags: added: qa-ok
removed: qa-needstesting
Changed in launchpad:
status: Fix Committed → In Progress
Revision history for this message
Aaron Bentley (abentley) wrote :

It appears that the problem is that PackageUpload.getSourceBuild only returns non-None if the upload succeeded. The tests of build failure emails must therefore have inaccurate test fixtures.

It's not clear to me whether there's another way to get the source build that would work in this context. bigjools suggests that build-based uploads can be detected because they will always have None for PackageUpload.signing_key, but using this check causes test failures.

Aaron Bentley (abentley)
Changed in launchpad:
assignee: Aaron Bentley (abentley) → nobody
status: In Progress → Triaged
Revision history for this message
Julian Edwards (julian-edwards) wrote :

We need to examine the rationale behind these emails and how they fit into the bigger picture of the existing source upload notifications.

Making source uploads from recipes look like "builds" seems very wrong to me, and when we start using them for Ubuntu they will most certainly want to continue using the existing notification logic and email style in PackageUpload.notify().

I think we should be doing this:

Build OK and Upload OK -> send no build notification email, let PU.notify() do the notifications (with changes to show it was from a recipe)
Build OK and Upload FAIL -> send no build notification email, let PU.notify() do the notifications (with changes to show it was from a recipe)
Build FAIL and no Upload -> send build failure notification only

The existing PU.notify() knows all about who to email and when, including multiple emails where necessary to the user and the changes list, for example. We have to use it.

Curtis Hovey (sinzui)
Changed in launchpad:
milestone: 11.02 → 11.03
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I think this has been deployed?

Revision history for this message
Aaron Bentley (abentley) wrote :

The linked branch has been deployed, but the fix is incomplete, so I reset the status to "Triaged."

Curtis Hovey (sinzui)
Changed in launchpad:
milestone: 11.03 → 11.04
Curtis Hovey (sinzui)
Changed in launchpad:
milestone: 11.04 → none
William Grant (wgrant)
tags: removed: qa-ok
Curtis Hovey (sinzui)
Changed in launchpad:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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