Result of SPRBuild assumes distro build

Bug #591618 reported by Michael Nelson
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Paul Hummer

Bug Description

I think the real issue here is that source package releases only have urls in the distro context... There is no link for a source package release in a PPA context (they're listed on the ppa page, with details on the packages page), but:

1) View a completed SourcePackageRecipeBuild, eg (in my case):

https://code.launchpad.dev/~ppa-user/+recipe/test-hello2/+build/7

Note the Result: section which states: hello in ubuntu 2.5+1~lucid1 as a link with the src:
https://code.launchpad.dev/ubuntu/lucid/+source/hello/2.5+1~lucid1

which 404s.

I think at the moment (as we don't support anything but PPA builds) this should not be linked. If you really did want to link it, I think the best link that could be provided currently would be: https://code.launchpad.dev/~ppa-user/+archive/test-ppa/+packages?field.name_filter=hello ), but I don't think this is necessary as there are already links to both the archive and the resulting binary build.

Related branches

Tim Penhey (thumper)
Changed in launchpad-code:
status: New → Triaged
importance: Undecided → High
tags: added: recipe
Revision history for this message
Aaron Bentley (abentley) wrote :

So the problem is that these objects sometimes have canonical url and sometimes don't. Is that a situation we want to perpetuate?

If these objects sometimes don't have canonical urls, then canonical_url should not return a URL sometimes.

Otherwise, we should just make sure the objects have URLs, which should be mostly a ZCML change.

Paul Hummer (rockstar)
Changed in launchpad-code:
assignee: nobody → Paul Hummer (rockstar)
milestone: none → 10.07
Paul Hummer (rockstar)
Changed in launchpad-code:
status: Triaged → In Progress
Revision history for this message
Paul Hummer (rockstar) wrote :

I'm finally getting back to this branch (my mistake) and I can't reproduce this at all. Michael, can you still reproduce this, and if so, please tell me how. My test seems to indicate that there is no link here. This is what my test looks like:

    def test_result_formatter(self):
        """SourcePackageRecipe results should not have a link."""
        build = self.makeRecipeBuild()
        build.queueBuild(build)
        release = self.factory.makeSourcePackageRelease(
            source_package_recipe_build=None)
        release.source_package_recipe_build = build
        transaction.commit()
        build_url = canonical_url(build)
        release_url = canonical_url(release)
        expected = str('%s in %s %s' % (
            release.name,
            release.upload_distroseries.distribution.bugtargetname,
            release.version))
        logout()

        browser = self.getUserBrowser(build_url, user=self.chef)
        result = find_tag_by_id(browser.contents, 'build-result')
        self.assertEqual(
            result.renderContents(),
            expected)

It returns a result that has no link at all. Reproduction instructions would be of help here.

Changed in launchpad-code:
status: In Progress → Incomplete
milestone: 10.08 → none
Revision history for this message
Paul Hummer (rockstar) wrote :

So my test must just be incorrect, since I've reproduced this on edge. Some help here making a good test would be very helpful

Paul Hummer (rockstar)
Changed in launchpad-code:
status: Incomplete → In Progress
Revision history for this message
Julian Edwards (julian-edwards) wrote :

After chatting to Paul, I think that "Result:" section makes no sense for recipe builds right now because PPAs don't have individual package pages.

So, you might as well just remove it and save the hassle here.

Changed in launchpad-code:
status: In Progress → Triaged
Paul Hummer (rockstar)
Changed in launchpad-code:
status: Triaged → In Progress
Revision history for this message
Paul Hummer (rockstar) wrote :

Playing in ec2 now.

Changed in launchpad-code:
milestone: none → 10.08
Revision history for this message
Paul Hummer (rockstar) wrote :

In devel 11193

Changed in launchpad-code:
status: In Progress → Fix Committed
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Paul Hummer (rockstar)
tags: added: qa-ok
removed: qa-needstesting
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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