+request-daily-build oops with an AttributeError: 'NoneType' object has no attribute 'published_archives'

Bug #828914 reported by Diogo Matsubara
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Brad Crittenden

Bug Description

OOPS-2055D50 logged an AttributeError: 'NoneType' object has no attribute 'published_archives' when a new build was requested.

Tags: oops qa-ok recipe

Related branches

Brad Crittenden (bac)
Changed in launchpad:
assignee: nobody → Brad Crittenden (bac)
status: Triaged → In Progress
Revision history for this message
Brad Crittenden (bac) wrote :

User was attempting to publish to this private ppa:

https://launchpad.net/~oem-solutions-group/+archive/ppa

Revision history for this message
Brad Crittenden (bac) wrote :

Rex we need detailed information from you on exactly what you are doing so we can reproduce the problem. I have asked William Grant to contact you on 2011-08-31 on IRC to get more details from you.

Revision history for this message
Rex Tsai (chihchun) wrote :

I tried it again today, but now it shows "500 Internal Server Error".

Test procedures -
* Open https://code.launchpad.net/~chihchun/+recipe/freerdp-daily-1.0.0
* Click "Request builds"
* Chose "oem:maza" as ppa archive, "natty" for distribution series.
* Click Request Builds, it will return "oops" or "500 Internal Server Error".

Revision history for this message
Rex Tsai (chihchun) wrote :
Revision history for this message
Rex Tsai (chihchun) wrote :
Revision history for this message
William Grant (wgrant) wrote :

22:17:21 <wgrant> So, ViewBuildFarmJobOld is buggy.
22:18:08 <wgrant> _getBuild can return an IBinaryPackageBuild or an ISourcePackageRecipeBuild. But it then passes that build into _checkBuildPermission,
                  which calls ViewBinaryPackageBuild on the build.
22:18:28 <wgrant> In this case it's a SourcePackageRecipeBuild, so ViewBinaryPackageBuild doesn't cope very well.

This bug isn't normally exposed, since ViewBinaryPackageBuild short-circuits if the user is a member of the owning team, and that works fine for SPRBs too. But in this case Rex is trying to request a build into an ~oem-archive PPA, where he isn't the owner but does have upload rights via a custom ArchivePermission. The ownership short-circuit isn't used, and we end up trying to retrieve a SourcePackageRelease from an SPRB.

So, to reproduce: create a private PPA, add an ArchivePermission for yourself, change the owner to a team of which you are not a member, and try to build a recipe into it.

Revision history for this message
Brad Crittenden (bac) wrote :

Thanks Rex for the extra info. And thanks William for the insight about ArchivePermission. The fix for this bug will soon be in review.

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Brad Crittenden (bac)
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.