← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/bfj-different-urls into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/bfj-different-urls into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bfj-different-urls/+merge/59730

This branch is the first of several to flatten BuildFarmJob and PackageBuild into SourcePackageRecipeBuild and BinaryPackageBuild, with the eventual goal of improving query peformance. Here I remove the external dependency on a unique BuildFarmJob.id, by splitting the BPB and SPRB URL namespaces.

The namespaces were merged early this year, when +build/BPB.id was replaced by +buildjob/BFJ.id. Redirects were left for the old URLs. I've made +build/BPB.id no longer redirect, added +recipebuild/SPRB.id, and changed +buildjob to redirect to +build or +recipebuild. Tests were updated to suit.

Lots of tests needed to be updated, and I also removed two unused ids in sourcepackagerecipe-builds.pt that used BFJ.id. No JS seems to use them, and Windmill passes with them removed.
-- 
https://code.launchpad.net/~wgrant/launchpad/bfj-different-urls/+merge/59730
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bfj-different-urls into lp:launchpad.
=== modified file 'lib/lp/buildmaster/interfaces/packagebuild.py'
--- lib/lp/buildmaster/interfaces/packagebuild.py	2011-01-06 00:49:57 +0000
+++ lib/lp/buildmaster/interfaces/packagebuild.py	2011-05-03 05:42:32 +0000
@@ -37,10 +37,6 @@
 
     id = Attribute('The package build ID.')
 
-    url_id = Attribute(
-        'A unique identifier for accessing the builds. '
-        'Used for the canonical_url generation.')
-
     archive = exported(
         Reference(
             title=_('Archive'), schema=IArchive,

=== modified file 'lib/lp/buildmaster/model/packagebuild.py'
--- lib/lp/buildmaster/model/packagebuild.py	2011-01-11 02:43:51 +0000
+++ lib/lp/buildmaster/model/packagebuild.py	2011-05-03 05:42:32 +0000
@@ -94,10 +94,6 @@
     build_farm_job_id = Int(name='build_farm_job', allow_none=False)
     build_farm_job = Reference(build_farm_job_id, 'BuildFarmJob.id')
 
-    @property
-    def url_id(self):
-        return self.build_farm_job_id
-
     # The following two properties are part of the IPackageBuild
     # interface, but need to be provided by derived classes.
     distribution = None

=== modified file 'lib/lp/code/browser/configure.zcml'
--- lib/lp/code/browser/configure.zcml	2011-02-16 13:28:59 +0000
+++ lib/lp/code/browser/configure.zcml	2011-05-03 05:42:32 +0000
@@ -1196,7 +1196,7 @@
     <browser:url
         for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild"
         attribute_to_parent="archive"
-        path_expression="string:+buildjob/${url_id}"
+        path_expression="string:+recipebuild/${id}"
         />
     <adapter
         for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild"

=== modified file 'lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py'
--- lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py	2011-01-14 15:39:43 +0000
+++ lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py	2011-05-03 05:42:32 +0000
@@ -45,7 +45,7 @@
         self.assertThat(
             canonical_url(build),
             StartsWith(
-                'http://launchpad.dev/~ppa-owner/+archive/ppa/+buildjob/'))
+                'http://launchpad.dev/~ppa-owner/+archive/ppa/+recipebuild/'))
 
 
 class TestSourcePackageRecipeBuild(BrowserTestCase):

=== modified file 'lib/lp/code/templates/sourcepackagerecipe-builds.pt'
--- lib/lp/code/templates/sourcepackagerecipe-builds.pt	2011-02-11 03:59:24 +0000
+++ lib/lp/code/templates/sourcepackagerecipe-builds.pt	2011-05-03 05:42:32 +0000
@@ -12,7 +12,7 @@
   <tbody>
     <tal:recipe-builds repeat="build view/builds">
       <tal:build-view define="buildview nocall:build/@@+index">
-        <tr class="package-build" tal:attributes="id string:build-${build/url_id}">
+        <tr class="package-build">
           <td>
             <span tal:replace="structure build/image:icon" />
             <a tal:content="buildview/status"
@@ -41,7 +41,7 @@
         </tr>
         <tal:binary-builds repeat="binary buildview/binary_builds">
           <tr tal:define="binaryview nocall:binary/@@+index"
-              class="binary-build" tal:attributes="id string:build-${binary/url_id}">
+              class="binary-build">
             <td class="indent">
               <span tal:replace="structure binary/image:icon"/>
               <a tal:content="binary/source_package_release/title"

=== modified file 'lib/lp/registry/browser/tests/test_person_view.py'
--- lib/lp/registry/browser/tests/test_person_view.py	2011-04-09 02:23:46 +0000
+++ lib/lp/registry/browser/tests/test_person_view.py	2011-05-03 05:42:32 +0000
@@ -680,16 +680,16 @@
         self.view = create_view(self.user, name='+related-software')
         html = self.view()
         self.assertTrue(
-            '<a href="/ubuntutest/+source/foo/666/+buildjob/%d">i386</a>' % (
-                self.build.url_id) in html)
+            '<a href="/ubuntutest/+source/foo/666/+build/%d">i386</a>' % (
+                self.build.id) in html)
 
     def test_related_ppa_packages_with_failed_build(self):
         # The link to the failed build is displayed.
         self.view = create_view(self.user, name='+ppa-packages')
         html = self.view()
         self.assertTrue(
-            '<a href="/ubuntutest/+source/foo/666/+buildjob/%d">i386</a>' % (
-                self.build.url_id) in html)
+            '<a href="/ubuntutest/+source/foo/666/+build/%d">i386</a>' % (
+                self.build.id) in html)
 
 
 class TestPersonDeactivateAccountView(TestCaseWithFactory):

=== modified file 'lib/lp/soyuz/browser/build.py'
--- lib/lp/soyuz/browser/build.py	2011-01-20 18:21:03 +0000
+++ lib/lp/soyuz/browser/build.py	2011-05-03 05:42:32 +0000
@@ -50,6 +50,8 @@
     )
 from lp.buildmaster.enums import BuildStatus
 from lp.buildmaster.interfaces.buildfarmjob import IBuildFarmJobSet
+from lp.code.interfaces.sourcepackagerecipebuild import (
+    ISourcePackageRecipeBuildSource)
 from lp.services.job.interfaces.job import JobStatus
 from lp.services.propertycache import cachedproperty
 from lp.soyuz.enums import PackageUploadStatus
@@ -90,7 +92,7 @@
 
     @property
     def path(self):
-        return u"+buildjob/%d" % self.context.url_id
+        return u"+build/%d" % self.context.id
 
 
 class BuildNavigation(GetitemNavigation, FileNavigationMixin):
@@ -107,11 +109,21 @@
         except ValueError:
             return None
         try:
-            build = getUtility(IBinaryPackageBuildSet).getByBuildID(build_id)
-        except NotFoundError:
-            return None
-        else:
-            return self.redirectSubTree(canonical_url(build))
+            return getUtility(IBinaryPackageBuildSet).getByBuildID(build_id)
+        except NotFoundError:
+            return None
+
+    @stepthrough('+recipebuild')
+    def traverse_recipebuild(self, name):
+        try:
+            build_id = int(name)
+        except ValueError:
+            return None
+        try:
+            return getUtility(ISourcePackageRecipeBuildSource).getById(
+                build_id)
+        except NotFoundError:
+            return None
 
     @stepthrough('+buildjob')
     def traverse_buildjob(self, name):
@@ -121,7 +133,8 @@
             return None
         try:
             build_job = getUtility(IBuildFarmJobSet).getByID(job_id)
-            return build_job.getSpecificJob()
+            return self.redirectSubTree(
+                canonical_url(build_job.getSpecificJob()))
         except NotFoundError:
             return None
 

=== modified file 'lib/lp/soyuz/browser/builder.py'
--- lib/lp/soyuz/browser/builder.py	2011-02-02 15:43:31 +0000
+++ lib/lp/soyuz/browser/builder.py	2011-05-03 05:42:32 +0000
@@ -64,9 +64,9 @@
     """Navigation methods for IBuilderSet."""
     usedfor = IBuilderSet
 
-    @stepthrough('+buildjob')
-    def traverse_buildjob(self, name):
-        build = super(BuilderSetNavigation, self).traverse_buildjob(name)
+    @stepthrough('+build')
+    def traverse_build(self, name):
+        build = super(BuilderSetNavigation, self).traverse_build(name)
         if build is None:
             return None
         else:

=== modified file 'lib/lp/soyuz/browser/tests/test_builder.py'
--- lib/lp/soyuz/browser/tests/test_builder.py	2011-01-14 00:56:05 +0000
+++ lib/lp/soyuz/browser/tests/test_builder.py	2011-05-03 05:42:32 +0000
@@ -18,7 +18,8 @@
     def test_buildjob_redirects_for_recipe_build(self):
         # /builders/+buildjob/<job id> redirects to the build page.
         build = self.factory.makeSourcePackageRecipeBuild()
-        url = 'http://launchpad.dev/builders/+buildjob/%s' % build.url_id
+        url = 'http://launchpad.dev/builders/+buildjob/%s' % (
+            build.build_farm_job.id)
         context, view, request = test_traverse(url)
         view()
         self.assertEqual(301, request.response.getStatus())
@@ -29,7 +30,8 @@
     def test_buildjob_redirects_for_binary_build(self):
         # /builders/+buildjob/<job id> redirects to the build page.
         build = self.factory.makeBinaryPackageBuild()
-        url = 'http://launchpad.dev/builders/+buildjob/%s' % build.url_id
+        url = 'http://launchpad.dev/builders/+buildjob/%s' % (
+            build.build_farm_job.id)
         context, view, request = test_traverse(url)
         view()
         self.assertEqual(301, request.response.getStatus())

=== modified file 'lib/lp/soyuz/doc/build-failedtoupload-workflow.txt'
--- lib/lp/soyuz/doc/build-failedtoupload-workflow.txt	2011-01-12 23:07:40 +0000
+++ lib/lp/soyuz/doc/build-failedtoupload-workflow.txt	2011-05-03 05:42:32 +0000
@@ -88,8 +88,8 @@
    * Component: main
    * State: Failed to upload
    * Duration: a minute
-   * Build Log: http://launchpad.dev/ubuntu/+source/cdrkit/1.0/+buildjob/22/+=
-  files/netapplet-1.0.0.tar.gz
+   * Build Log: http://launchpad.dev/ubuntu/+source/cdrkit/1.0/+build/22/+fil=
+  es/netapplet-1.0.0.tar.gz
    * Builder: http://launchpad.dev/builders/bob
    * Source: http://launchpad.dev/ubuntu/+source/cdrkit/1.0
   <BLANKLINE>
@@ -101,7 +101,7 @@
   <BLANKLINE>
   --
   i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE
-  http://launchpad.dev/ubuntu/+source/cdrkit/1.0/+buildjob/22
+  http://launchpad.dev/ubuntu/+source/cdrkit/1.0/+build/22
   <BLANKLINE>
 
 

=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-files.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-files.txt	2011-04-27 04:16:20 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-files.txt	2011-05-03 05:42:32 +0000
@@ -181,7 +181,7 @@
     >>> no_priv_browser.getControl("Filter").click()
 
     >>> check_urls(no_priv_browser, builds_links,
-    ...            'http://launchpad.dev/~no-priv/+archive/p3a/+buildjob/31')
+    ...            'http://launchpad.dev/~no-priv/+archive/p3a/+build/31')
     buildlog_ubuntu-breezy-autotest-i386.test-pkg_1.0_FULLYBUILT.txt.gz: OK
 
     >>> no_priv_browser.open(
@@ -208,7 +208,7 @@
     i386 build of test-pkg 1.0 : PPA named p3a for No Privileges Person : No Privileges Person
 
     >>> check_urls(no_priv_browser, build_links,
-    ...            'http://launchpad.dev/~no-priv/+archive/p3a/+buildjob/31')
+    ...            'http://launchpad.dev/~no-priv/+archive/p3a/+build/31')
     test-bin_1.0_i386.changes:    OK
     buildlog_...txt.gz:           OK
     upload_..._log.txt:           OK
@@ -318,17 +318,17 @@
     Location: http://localhost/~no-priv/+archive/ppa/+files/test-pkg_1.0.dsc
     ...
 
-The same redirection happens for +archive/+buildjob/blah urls:
+The same redirection happens for +archive/+build/blah urls:
 
     >>> buildlog_lp_url_without_ppa_name = (
-    ...     'http://launchpad.dev/~no-priv/+archive/+buildjob/1/+files/foo')
+    ...     'http://launchpad.dev/~no-priv/+archive/+build/1/+files/foo')
     >>> print http(r"""
     ... GET %s HTTP/1.1
     ... """ % buildlog_lp_url_without_ppa_name.replace(
     ...     'http://launchpad.dev', ''))
     HTTP/1.1 301 Moved Permanently
     ...
-    Location: http://.../~no-priv/+archive/ppa/+buildjob/1/+files/...
+    Location: http://.../~no-priv/+archive/ppa/+build/1/+files/...
     ...
 
 

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-binarypackagerelease-index.txt'
--- lib/lp/soyuz/stories/soyuz/xx-binarypackagerelease-index.txt	2011-01-12 23:07:40 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-binarypackagerelease-index.txt	2011-05-03 05:42:32 +0000
@@ -14,7 +14,7 @@
   ...     'i386 build of mozilla-firefox 0.9 in ubuntu '
   ...     'warty RELEASE')
   >>> build_link.url
-  'http://launchpad.dev/ubuntu/+source/mozilla-firefox/0.9/+buildjob/2'
+  'http://launchpad.dev/ubuntu/+source/mozilla-firefox/0.9/+build/2'
 
 Next, we'll manually create a suitable package upload record for our
 build:
@@ -40,7 +40,7 @@
 
   >>> build_link.click()
   >>> browser.url
-  'http://launchpad.dev/ubuntu/+source/mozilla-firefox/0.9/+buildjob/2'
+  'http://launchpad.dev/ubuntu/+source/mozilla-firefox/0.9/+build/2'
 
 This build produced one BinaryPackage, called 'mozilla-firefox 0.9',
 which is presented in the right portlet, called 'Resulting Binaries'.

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-build-record.txt'
--- lib/lp/soyuz/stories/soyuz/xx-build-record.txt	2011-01-12 23:07:40 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-build-record.txt	2011-05-03 05:42:32 +0000
@@ -39,7 +39,7 @@
 individual `Build`, and they can be accessed via the build-farm URL
 shortcut.
 
-    >>> build_url = "http://launchpad.dev/builders/+buildjob/%d"; % build_id
+    >>> build_url = "http://launchpad.dev/builders/+build/%d"; % build_id
 
 Using the short-cut URL any user can promptly access the build
 page. It's title briefly describes the build.
@@ -226,10 +226,10 @@
     http://launchpad.dev/builders/bob
 
     >>> print anon_browser.getLink('buildlog').url
-    http://.../+buildjob/31/+files/fake-buildlog
+    http://.../+build/31/+files/fake-buildlog
 
     >>> print anon_browser.getLink('uploadlog').url
-    http://.../+buildjob/31/+files/fake-uploadlog
+    http://.../+build/31/+files/fake-uploadlog
 
 Note that the links to the logs points to their `ProxiedLibrarianFile`
 entry points, so users with permission can reach the files even if
@@ -249,7 +249,7 @@
     uploadlog (7 bytes)
 
     >>> print admin_browser.getLink('Retry this build').url
-    http://launchpad.dev/ubuntutest/+source/testing/1.0/+buildjob/31/+retry
+    http://launchpad.dev/ubuntutest/+source/testing/1.0/+build/31/+retry
 
 By clicking on the 'Retry this build' link, administrators are informed of
 the consequences of this action.
@@ -337,7 +337,7 @@
     testing_1.0_all.changes (15 bytes)
 
     >>> print anon_browser.getLink('testing_1.0_all.changes').url
-    http://.../+buildjob/31/+files/testing_1.0_all.changes
+    http://.../+build/31/+files/testing_1.0_all.changes
 
     >>> print extract_text(
     ...     find_tag_by_id(anon_browser.contents, 'binaries'))
@@ -364,7 +364,7 @@
 already have access to them.
 
     >>> print anon_browser.getLink('testing-bin_1.0_all.deb').url
-    http://.../+buildjob/31/+files/testing-bin_1.0_all.deb
+    http://.../+build/31/+files/testing-bin_1.0_all.deb
 
 Again, note that the files are `ProxiedLibrarianFile` objects as well.
 
@@ -389,7 +389,7 @@
     LinkNotFoundError
 
     >>> print anon_browser.getLink('testing-bin_1.0_all.deb').url
-    http://.../+buildjob/31/+files/testing-bin_1.0_all.deb
+    http://.../+build/31/+files/testing-bin_1.0_all.deb
 
 When new binaries are accepted by an archive administrator (See
 xx-queue-pages.txt) this condition is presented in the build page.
@@ -413,7 +413,7 @@
     LinkNotFoundError
 
     >>> print anon_browser.getLink('testing-bin_1.0_all.deb').url
-    http://.../+buildjob/31/+files/testing-bin_1.0_all.deb
+    http://.../+build/31/+files/testing-bin_1.0_all.deb
 
 Once the accepted binary upload is processed by the backend, the
 binary reference finally becomes a link to its corresponding page.
@@ -455,7 +455,7 @@
     >>> [ppa_build] = ppa_source.getBuilds()
     >>> ppa_build.builder = bob_builder
     >>> ppa_build_url = (
-    ...     "http://launchpad.dev/builders/+buildjob/%d"; % ppa_build.id)
+    ...     "http://launchpad.dev/builders/+build/%d"; % ppa_build.id)
     >>> logout()
 
     >>> anon_browser.open(ppa_build_url)
@@ -478,10 +478,10 @@
     http://launchpad.dev/builders/bob
 
     >>> print anon_browser.getLink('buildlog').url
-    http://launchpad.dev/~cprov/+archive/ppa/+buildjob/.../+files/buildlog_...
+    http://launchpad.dev/~cprov/+archive/ppa/+build/.../+files/buildlog_...
 
     >>> print anon_browser.getLink('ppa-test-bin_1.0_i386.changes').url
-    http://.../+buildjob/.../+files/ppa-test-bin_1.0_i386.changes
+    http://.../+build/.../+files/ppa-test-bin_1.0_i386.changes
 
 'Build details', as mentioned above, doesn't link to the PPA source
 packages, since they do not exist.
@@ -543,7 +543,7 @@
     ...
 
     >>> print anon_browser.getLink('~cprov/product/mybranch recipe build').url
-    http://launchpad.dev/~cprov/+archive/ppa/+buildjob/...
+    http://launchpad.dev/~cprov/+archive/ppa/+build/1
 
 Finally, the 'Build files' section is identical for PPA builds.
 
@@ -554,7 +554,7 @@
     ppa-test-bin_1.0_all.deb (18 bytes)
 
     >>> print anon_browser.getLink('ppa-test-bin_1.0_all.deb').url
-    http://.../+buildjob/.../+files/ppa-test-bin_1.0_all.deb
+    http://.../+build/.../+files/ppa-test-bin_1.0_all.deb
 
 
 Imported binaries builds
@@ -574,7 +574,7 @@
     None
 
     >>> imported_build_url = (
-    ...     "http://launchpad.dev/builders/+buildjob/%d"; % imported_build.url_id)
+    ...     "http://launchpad.dev/builders/+build/%d"; % imported_build.id)
 
     >>> logout()
 

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-buildfarm-index.txt'
--- lib/lp/soyuz/stories/soyuz/xx-buildfarm-index.txt	2011-01-12 23:07:40 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-buildfarm-index.txt	2011-05-03 05:42:32 +0000
@@ -32,7 +32,7 @@
 
     >>> print anon_browser.getLink(
     ...     'i386 build of mozilla-firefox 0.9').url
-    http://launchpad.dev/ubuntu/+source/mozilla-firefox/0.9/+buildjob/8
+    http://launchpad.dev/ubuntu/+source/mozilla-firefox/0.9/+build/8
 
 The build status portlets contain the number of builds waiting
 in queue and the sum of their 'estimated_duration' for each

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt	2011-01-12 23:07:40 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt	2011-05-03 05:42:32 +0000
@@ -188,7 +188,7 @@
     Breezy Badger Autotest: i386
 
     >>> print anon_browser.getLink('i386').url
-    http://launchpad.dev/ubuntutest/+source/testing-dspr/1.0/+buildjob/...
+    http://launchpad.dev/ubuntutest/+source/testing-dspr/1.0/+build/...
 
 The 'Downloads' section lists and links to the files for this
 source. Each file links to its normalized download path based on the

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-private-builds.txt'
--- lib/lp/soyuz/stories/soyuz/xx-private-builds.txt	2011-01-12 23:07:40 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-private-builds.txt	2011-05-03 05:42:32 +0000
@@ -109,7 +109,7 @@
 users:
 
     >>> anon_browser.open(
-    ...     "http://launchpad.dev/~cprov/+archive/p3a/+buildjob/%s"; %
+    ...     "http://launchpad.dev/~cprov/+archive/p3a/+build/%s"; %
     ...     private_build_id)
     Traceback (most recent call last):
     ...
@@ -118,10 +118,10 @@
 But it is fine for authorised users:
 
     >>> cprov_browser.open(
-    ...     "http://launchpad.dev/~cprov/+archive/p3a/+buildjob/%s"; %
+    ...     "http://launchpad.dev/~cprov/+archive/p3a/+build/%s"; %
     ...     private_build_id)
     >>> print cprov_browser.url
-    http://launchpad.dev/~cprov/+archive/p3a/+buildjob/...
+    http://launchpad.dev/~cprov/+archive/p3a/+build/...
 
 
 == Builder history page ==
@@ -253,7 +253,7 @@
     >>> from zope.security.interfaces import Unauthorized
     >>> try:
     ...     anon_browser.open(
-    ...         "http://launchpad.dev/~cprov/+archive/p3a/+buildjob/%s"; %
+    ...         "http://launchpad.dev/~cprov/+archive/p3a/+build/%s"; %
     ...         private_build_id)
     ... except Unauthorized:
     ...     print "Got expected exception"
@@ -264,7 +264,7 @@
     >>> browser = setupBrowser(auth="Basic no-priv@xxxxxxxxxxxxx:test")
     >>> try:
     ...     browser.open(
-    ...         "http://launchpad.dev/~cprov/+archive/p3a/+buildjob/%s"; %
+    ...         "http://launchpad.dev/~cprov/+archive/p3a/+build/%s"; %
     ...         private_build_id)
     ... except Unauthorized:
     ...     print "Got expected exception"
@@ -319,13 +319,13 @@
 Accessing the build page will now also work:
 
     >>> anon_browser.open(
-    ...     "http://launchpad.dev/~cprov/+archive/p3a/+buildjob/%s"; %
+    ...     "http://launchpad.dev/~cprov/+archive/p3a/+build/%s"; %
     ...     private_build_id)
     >>> print anon_browser.title
     i386 build of privacy-test 666 : PPA named p3a for Celso Providelo : Celso Providelo
 
     >>> browser.open(
-    ...     "http://launchpad.dev/~cprov/+archive/p3a/+buildjob/%s"; %
+    ...     "http://launchpad.dev/~cprov/+archive/p3a/+build/%s"; %
     ...     private_build_id)
     >>> print browser.title
     i386 build of privacy-test 666 : PPA named p3a for Celso Providelo : Celso Providelo
@@ -342,7 +342,7 @@
     breezy-autotest i386 Successfully built
 
     >>> print browser.getLink('i386').url
-    http://launchpad.dev/~cprov/+archive/p3a/+buildjob/...
+    http://launchpad.dev/~cprov/+archive/p3a/+build/...
 
 Similarly, when accessing the distribution source package release page,
 the main content will display a link to the newly unembargoed build:
@@ -355,4 +355,4 @@
     Breezy Badger Autotest: i386
 
     >>> print browser.getLink('i386').url
-    http://launchpad.dev/~cprov/+archive/p3a/+buildjob/...
+    http://launchpad.dev/~cprov/+archive/p3a/+build/...

=== modified file 'lib/lp/soyuz/stories/webservice/xx-builds.txt'
--- lib/lp/soyuz/stories/webservice/xx-builds.txt	2011-02-13 22:54:48 +0000
+++ lib/lp/soyuz/stories/webservice/xx-builds.txt	2011-05-03 05:42:32 +0000
@@ -51,15 +51,15 @@
     date_first_dispatched: None
     dependencies: None
     distribution_link: u'http://.../beta/ubuntu'
-    log_url: u'http://.../~cprov/+archive/ppa/+buildjob/26/+files/netapplet-1.0.0.tar.gz'
+    log_url: u'http://.../~cprov/+archive/ppa/+build/26/+files/netapplet-1.0.0.tar.gz'
     pocket: u'Release'
     resource_type_link: u'http://api.launchpad.dev/beta/#build'
     score: None
-    self_link: u'http://api.launchpad.dev/beta/~cprov/+archive/ppa/+buildjob/26'
+    self_link: u'http://api.launchpad.dev/beta/~cprov/+archive/ppa/+build/26'
     status: u'Failed to build'
     title: u'i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE'
     upload_log_url: None
-    web_link: u'http://launchpad.../~cprov/+archive/ppa/+buildjob/26'
+    web_link: u'http://launchpad.../~cprov/+archive/ppa/+build/26'
 
 Whereas the 1.0 webservice for builds maintains the old property names
 (without underscores):
@@ -69,7 +69,7 @@
     >>> pprint_entry(builds_1_0['entries'][0])
     arch_tag: u'i386'
     archive_link: u'http://.../~cprov/+archive/ppa'
-    build_log_url: u'http://.../~cprov/+archive/ppa/+buildjob/26/+files/netapplet-1.0.0.tar.gz'
+    build_log_url: u'http://.../~cprov/+archive/ppa/+build/26/+files/netapplet-1.0.0.tar.gz'
     buildstate: u'Failed to build'
     can_be_rescored: False
     can_be_retried: True
@@ -83,10 +83,10 @@
     pocket: u'Release'
     resource_type_link: u'http://.../#build'
     score: None
-    self_link: u'http://.../~cprov/+archive/ppa/+buildjob/26'
+    self_link: u'http://.../~cprov/+archive/ppa/+build/26'
     title: u'i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE'
     upload_log_url: None
-    web_link: u'http://launchpad.../~cprov/+archive/ppa/+buildjob/26'
+    web_link: u'http://launchpad.../~cprov/+archive/ppa/+build/26'
 
 For testing purposes we will set 'buildlog' and 'upload_log' to the
 same library file, so both can be verified.
@@ -112,10 +112,10 @@
     ...     source_pub['self_link'], 'getBuilds').jsonBody()
 
     >>> print builds['entries'][0]['log_url']
-    http://launchpad.dev/~cprov/+archive/ppa/+buildjob/26/+files/...
+    http://launchpad.dev/~cprov/+archive/ppa/+build/26/+files/...
 
     >>> print builds['entries'][0]['upload_log_url']
-    http://launchpad.dev/~cprov/+archive/ppa/+buildjob/26/+files/...
+    http://launchpad.dev/~cprov/+archive/ppa/+build/26/+files/...
 
 Re-trying builds
 ================

=== modified file 'lib/lp/soyuz/tests/test_binarypackagebuild.py'
--- lib/lp/soyuz/tests/test_binarypackagebuild.py	2011-01-24 20:57:37 +0000
+++ lib/lp/soyuz/tests/test_binarypackagebuild.py	2011-05-03 05:42:32 +0000
@@ -103,7 +103,7 @@
         self.addFakeBuildLog()
         self.failUnlessEqual(
             'http://launchpad.dev/ubuntutest/+source/'
-            'gedit/666/+buildjob/%d/+files/mybuildlog.txt' % (
+            'gedit/666/+build/%d/+files/mybuildlog.txt' % (
                 self.build.package_build.build_farm_job.id),
             self.build.log_url)
 
@@ -116,7 +116,7 @@
             owner=ppa_owner, name="myppa")
         self.failUnlessEqual(
             'http://launchpad.dev/~joe/'
-            '+archive/myppa/+buildjob/%d/+files/mybuildlog.txt' % (
+            '+archive/myppa/+build/%d/+files/mybuildlog.txt' % (
                 self.build.build_farm_job.id),
             self.build.log_url)
 

=== modified file 'lib/lp/soyuz/tests/test_build.py'
--- lib/lp/soyuz/tests/test_build.py	2011-01-20 20:45:37 +0000
+++ lib/lp/soyuz/tests/test_build.py	2011-05-03 05:42:32 +0000
@@ -126,7 +126,7 @@
             self.das.architecturetag, spn, version)
         self.assertEquals(expected_buildlog, build.log.filename)
         url_start = (
-            'http://launchpad.dev/%s/+source/%s/%s/+buildjob/%s/+files' % (
+            'http://launchpad.dev/%s/+source/%s/%s/+build/%s/+files' % (
                 self.distroseries.distribution.name, spn, version, build.id))
         expected_buildlog_url = '%s/%s' % (url_start, expected_buildlog)
         self.assertEquals(expected_buildlog_url, build.log_url)
@@ -218,7 +218,7 @@
         expected_filename = 'upload_%s_log.txt' % build.id
         self.assertEquals(expected_filename, build.upload_log.filename)
         url_start = (
-            'http://launchpad.dev/%s/+source/%s/%s/+buildjob/%s/+files' % (
+            'http://launchpad.dev/%s/+source/%s/%s/+build/%s/+files' % (
                 self.distroseries.distribution.name, spph.source_package_name,
                 spph.source_package_version, build.id))
         expected_url = '%s/%s' % (url_start, expected_filename)