← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~pappacena/launchpad:ui-manage-ocirecipe-for-projects into launchpad:master

 

twom, added the feature flag to control which distribution should be used for OCIRecipes of OCIProjects based on IProduct. We fallback gracefully to Ubuntu if the feature flag is not set.

Diff comments:

> diff --git a/lib/lp/oci/model/ocirecipe.py b/lib/lp/oci/model/ocirecipe.py
> index 8562778..245e730 100644
> --- a/lib/lp/oci/model/ocirecipe.py
> +++ b/lib/lp/oci/model/ocirecipe.py
> @@ -216,9 +217,12 @@ class OCIRecipe(Storm, WebhookTargetMixin):
>  
>      @property
>      def distribution(self):
> -        # XXX twom 2019-12-05 This may need to change when an OCIProject
> -        # pillar isn't just a distribution
> -        return self.oci_project.distribution
> +        if self.oci_project.distribution:
> +            return self.oci_project.distribution
> +        # XXX pappacena 2020-05-28: If the related OCIProject is not
> +        # based on distribution, maybe we should get the default distro from
> +        # a feature flag, instead of hardcoding Ubuntu.
> +        return getUtility(ILaunchpadCelebrities).ubuntu

I agree. Added this note to fix after, and ended up forgetting to fix.

>  
>      @property
>      def distro_series(self):


-- 
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/384755
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:ui-manage-ocirecipe-for-projects into launchpad:master.


References