Recipe requires sourcepackagename before upload

Bug #515581 reported by Michael Nelson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Paul Hummer

Bug Description

Currently, the schema for sourcepackagerecipe (and build) requires a reference to a sourcepackagename, but I think this assumes the package that the recipe is to build and upload has already been uploaded in the past, so that the sourcepackagename exists.

We could create the sourcepackagename records if they don't exist when the recipe is created, but it might pollute the namespace before an actual upload has happened. Could we instead store the proposed *string* sourcepackagename on the recipe (and recipe build)? This would enable the current infrastructure to find-or-create the sourcepackagename record when the upload is processed as normal.

Update: as per comment 6 below, we no-longer need to be asking for the source package name when creating a recipe.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I don't really see why that is a bad thing.

As the mocked up UI seems to involve treating the recipe as an annotation to the 'base' branch of the recipe (hmm... that's an idea that sets off some interesting thoughts...), won't we know there's already a sourcepackagename?

(There's the separate issue that you can't create a sourcepackagename by pushing a branch, but we'll need to fix that sooner or later).

Revision history for this message
Michael Nelson (michael.nelson) wrote :

It may not be a bad thing to create the sourcepackagename record when the recipe is created, but I can imagine situations where the recipe fails, nothing is ever uploaded and so no sourcepackage ever exists in the DB with that name.

Whereas it does seem possible to defer the creation of the spn record to the usual upload (ie. after the recipe is successful and the source uploaded), by storing a string nascent sourcepackagename on the recipe/build. But maybe it's a non-issue.

summary: - Recipe has sourcepackagename before upload
+ Recipe requires sourcepackagename before upload
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

As I said on the phone, I don't particularly understand what SourcePackageName is for at all :-)

Any upload to any PPA creates a SPN row -- even a source that never builds, I presume -- so I don't think that one more way of doing this is a big deal.

Changed in launchpad-code:
status: New → Won't Fix
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Sourcepackagename is for database normalisation. I don't think you want the same string repeated on hundreds of package version records. ;)

I talked to Michael N and we agree that we can just traverse through a string package name for recipes, they won't be as prevalent as sourcepackagerelease.

Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: [Bug 515581] Re: Recipe requires sourcepackagename before upload

On Tue, Feb 9, 2010 at 3:58 PM, Julian Edwards
<email address hidden> wrote:
> Sourcepackagename is for database normalisation.  I don't think you want
> the same string repeated on hundreds of package version records. ;)
>
> I talked to Michael N and we agree that we can just traverse through a
> string package name for recipes, they won't be as prevalent as
> sourcepackagerelease.

Julian, I think MichaelH's point is that he doesn't see a reason why
it's bad to create the record when the SPRecipe is created.

Also, I don't think it's worth considering any updates to the SPRecipe
code until we finalise the UI and see exactly what we need for users
to be able to use it - sorry for the noise.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

As far as I can see, we no longer need the source package name initially anyway - that is: (1) the source package name is no longer used in the recipe URL, (2) we no longer need to pass it as the --package option to dailydeb.

Therefore, there's no longer a good reason for requesting this (redundant) information from the user when they create a recipe (in fact, the first question from pitti during the demo was exactly that).

If it is still a db schema constraint, we should obviously change that, but in the mean time, if we are not using it, we could potentially remove it from the UI and populate it with something temporarily.

I assume eventually we should populate it *after* the source package build, perhaps being returned by the builder.

Changed in launchpad-code:
status: Won't Fix → New
description: updated
Aaron Bentley (abentley)
tags: added: recipe
Paul Hummer (rockstar)
Changed in launchpad-code:
status: New → In Progress
assignee: nobody → Paul Hummer (rockstar)
importance: Undecided → High
Revision history for this message
Paul Hummer (rockstar) wrote :

Fixed in devel 10971

Changed in launchpad-code:
status: In Progress → Fix Committed
milestone: none → 10.06
Curtis Hovey (sinzui)
Changed in launchpad-code:
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.