Unembargoing packages via the API doesn't seem to apply overrides correctly

Bug #475808 reported by Julian Edwards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Michael Nelson

Bug Description

OOPS-1405B2440

The flashplugin-nonfree package has a component of "contrib" which would have been overriden to "multiverse" when first uploading it to Ubuntu. However when unembargoing an update from the security PPA, the override seems to not work and the above OOPS is generated.

"QueueInconsistentStateError: Component "contrib" is not allowed in hardy"

Related branches

Changed in soyuz:
status: New → Triaged
importance: Undecided → High
milestone: none → 3.1.11
tags: added: ppa soyuz-security soyuz-upload
Changed in soyuz:
milestone: 3.1.11 → 3.1.12
Changed in soyuz:
assignee: nobody → Michael Nelson (michael.nelson)
description: updated
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Pre-implementation notes:

AFAICS, this will affect any (delayed) copy where the source package release component has been overridden from a component not in the distroseries.upload_components.

The issue is that, for delayed copies, the component is not yet overridden when the PackageUpload is accepted, as it does not yet have a publishing history. The check that is happening during acceptFromCopy() ends up at PackageUploadSource.checkComponentAndSection() which currently only considers the SourcePackageRelease.

So, I plan to add a caveat to PackageUploadSource.checkComponentAndSection() that will, for delayed copies, use the component from the (soon-to-be) ancestry, rather than the SPR.

tags: added: current-rollout-blocker
Revision history for this message
Michael Nelson (michael.nelson) wrote :

I played around with testing this on dogfood with the following test plan:

   0 Ensure that ~michael.nelson/+archive/pocketsphinx is private
   1 Upload a new version of pocketsphinx to ~michael.nelson/+archive/pocketsphinx
     that is for contrib component (Done). It will be overridden to main when
     published. Run ppa-run.sh.
   2 Wait for i386 build to build successfully (Done).
   3 in a harness (or the API if available), do the archive.syncSource()
     with binaries included, as shown in
     https://lp-oops.canonical.com/oops.py/?oopsid=1405B2440 and verify
     that it fails with the same traceback.
{{{
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
>>> ubuntu.main_archive
<Archive at 0xae2c10c>
>>> ubuntu.main_archive.title
u'Primary Archive for Ubuntu'
>>> primary_archive = ubuntu.main_archive
>>> myppa = getUtility(IPersonSet).getByName('michael.nelson').ppas[0]
>>> myppa.title
u'Pocketsphinx packages for karmic'
>>> karmic = ubuntu['karmic']
>>> ret_val = primary_archive.syncSource(from_archive=myppa, include_binaries=True, source_name='pocketsphinx', to_pocket='Security', to_series='karmic', version='0.5.1+dfsg1-0ubuntu1+ppa1')
}}}

although the test was invalid as I didn't have a private PPA the first time. But while going through this, I realised that the same fix needs to be done for the builds being included in the copy (see PackageUploadBuild.checkComponentAndSection()), and the test will need to be updated to test this also.

So, this won't land in 3.1.12, but I'll aim to land it first thing in the next release.

tags: removed: current-rollout-blocker
Revision history for this message
Данило Шеган (danilo) wrote :

Is this a re-roll candidate then?

Revision history for this message
Julian Edwards (julian-edwards) wrote : Re: [Bug 475808] Re: Unembargoing packages via the API doesn't seem to apply overrides correctly

On Tuesday 15 December 2009 15:10:48 Данило Шеган wrote:
> Is this a re-roll candidate then?
>

No, I think we'll punt it to the next release now, it's best not to rush it.

Cheers.

Changed in soyuz:
status: Triaged → In Progress
Revision history for this message
Michael Nelson (michael.nelson) wrote :

OK, after fixing the issue for copied binaries also, I retested this on dogfood successfully:

http://pastebin.ubuntu.com/343727/

I'll get a re-review and land it.

Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in soyuz:
status: In Progress → Fix Committed
Changed in soyuz:
milestone: 3.1.12 → 10.01
Changed in soyuz:
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.