← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] lp:~cjwatson/launchpad/git-ref-remote-blob into lp:launchpad

 

Review: Approve code



Diff comments:

> 
> === modified file 'lib/lp/snappy/model/snap.py'
> --- lib/lp/snappy/model/snap.py	2018-06-20 16:04:57 +0000
> +++ lib/lp/snappy/model/snap.py	2018-06-20 16:04:57 +0000
> @@ -553,8 +554,17 @@
>      def requestBuildsFromJob(self, requester, archive, pocket, channels=None,
>                               logger=None):
>          """See `ISnap`."""
> -        snapcraft_data = removeSecurityProxy(
> -            getUtility(ISnapSet).getSnapcraftYaml(self))
> +        try:
> +            snapcraft_data = removeSecurityProxy(
> +                getUtility(ISnapSet).getSnapcraftYaml(self))
> +        except CannotFetchSnapcraftYaml as e:
> +            if not e.unsupported_remote:
> +                raise
> +            # The only reason we can't fetch the file is because we don't
> +            # support fetching from this repository's host.  In this case
> +            # the best thing is to fall back to building for all supported
> +            # architectures.

It's just that if someone starts requesting lots of imports from GitLab or Bitbucket, the mainframe will catch on fire. But sounds like that hasn't happened yet so we should be good.

> +            snapcraft_data = {}
>          # Sort by Processor.id for determinism.  This is chosen to be the
>          # same order as in BinaryPackageBuildSet.createForSource, to
>          # minimise confusion.


-- 
https://code.launchpad.net/~cjwatson/launchpad/git-ref-remote-blob/+merge/348089
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.


References