← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~pappacena/launchpad:better-error-msg-snap-without-source into launchpad:master

 

Review: Approve



Diff comments:

> diff --git a/lib/lp/snappy/model/snap.py b/lib/lp/snappy/model/snap.py
> index 7e3d14c..2511625 100644
> --- a/lib/lp/snappy/model/snap.py
> +++ b/lib/lp/snappy/model/snap.py
> @@ -1359,6 +1359,9 @@ class SnapSet:
>          """See `ISnapSet`."""
>          if ISnap.providedBy(context):
>              context = context.source
> +        if context is None:
> +            raise CannotFetchSnapcraftYaml(
> +                "Snap source is not defined", unsupported_remote=True)

Hm.  We use unsupported_remote=True to mean something like "your repository is on some git hosting site we don't know about specifically, so we don't know how to fetch individual files from it efficiently", with the intent of falling back to building for all supported architectures.  That doesn't seem to apply here - I think it would be better to use the default of unsupported_remote=False so that the build actually fails.

>          try:
>              paths = (
>                  "snap/snapcraft.yaml",


-- 
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/398726
Your team Launchpad code reviewers is subscribed to branch ~pappacena/launchpad:better-error-msg-snap-without-source.


Follow ups