← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~pappacena/launchpad:oci-upload-prevent-superseded into launchpad:master

 


Diff comments:

> diff --git a/lib/lp/oci/model/ocirecipebuild.py b/lib/lp/oci/model/ocirecipebuild.py
> index eda6fa3..7c003bc 100644
> --- a/lib/lp/oci/model/ocirecipebuild.py
> +++ b/lib/lp/oci/model/ocirecipebuild.py
> @@ -479,6 +481,20 @@ class OCIRecipeBuild(PackageBuildMixin, Storm):
>                  "uploaded.")
>          getUtility(IOCIRegistryUploadJobSource).create(self)
>  
> +    def hasMoreRecentBuild(self):
> +        """See `IOCIRecipeBuild`."""
> +        status = [
> +            BuildStatus.NEEDSBUILD, BuildStatus.FULLYBUILT,
> +            BuildStatus.BUILDING, BuildStatus.UPLOADING

I guess now that we have a real retry button for OCI recipe builds, a strategy to guess when we have superseded builds feels wrong. Shall we drop this MP?

> +        ]
> +        recent_builds = IStore(self).find(
> +            OCIRecipeBuild,
> +            OCIRecipeBuild.recipe == self.recipe,
> +            OCIRecipeBuild.processor == self.processor,
> +            OCIRecipeBuild.status.is_in(status),
> +            OCIRecipeBuild.date_created > self.date_created)
> +        return not recent_builds.is_empty()
> +
>  
>  @implementer(IOCIRecipeBuildSet)
>  class OCIRecipeBuildSet(SpecificBuildFarmJobSourceMixin):


-- 
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/394269
Your team Launchpad code reviewers is subscribed to branch ~pappacena/launchpad:oci-upload-manifest-upsert.


References