← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~pappacena/launchpad:fix-ocirecipebuild-api-export into launchpad:master

 

Thiago F. Pappacena has proposed merging ~pappacena/launchpad:fix-ocirecipebuild-api-export into launchpad:master.

Commit message:
Fix error starting app server due to a missing API entity (OCIRecipeBuild).

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/383028
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:fix-ocirecipebuild-api-export into launchpad:master.
diff --git a/lib/lp/oci/interfaces/ocirecipebuild.py b/lib/lp/oci/interfaces/ocirecipebuild.py
index a1fbfc0..10bc82b 100644
--- a/lib/lp/oci/interfaces/ocirecipebuild.py
+++ b/lib/lp/oci/interfaces/ocirecipebuild.py
@@ -17,6 +17,7 @@ from lazr.enum import (
     EnumeratedType,
     Item,
     )
+from lazr.restful.declarations import export_as_webservice_entry
 from lazr.restful.fields import (
     CollectionField,
     Reference,
@@ -203,6 +204,9 @@ class IOCIRecipeBuildAdmin(Interface):
 class IOCIRecipeBuild(IOCIRecipeBuildAdmin, IOCIRecipeBuildEdit,
                       IOCIRecipeBuildView):
     """A build record for an OCI recipe."""
+    export_as_webservice_entry(
+        publish_web_link=True, as_of="devel",
+        singular_name="oci_recipe_build")
 
 
 class IOCIRecipeBuildSet(ISpecificBuildFarmJobSource):
diff --git a/lib/lp/oci/interfaces/webservice.py b/lib/lp/oci/interfaces/webservice.py
index 4db31e1..a6bcc65 100644
--- a/lib/lp/oci/interfaces/webservice.py
+++ b/lib/lp/oci/interfaces/webservice.py
@@ -8,7 +8,8 @@ __all__ = [
     'IOCIProjectSeries',
     'IOCIPushRule',
     'IOCIRecipe',
-    'IOCIRecipeBuildRequest'
+    'IOCIRecipeBuild',
+    'IOCIRecipeBuildRequest',
     ]
 
 from lp.oci.interfaces.ocipushrule import IOCIPushRule

Follow ups