fix(mirror): skip LFS instead of failing to mirror a repo

Noel created

If an LFS client can't be created because it's not compatible for
some reason, skip it entirely for a mirrored repo. This prevents one
possible crash when mirroring fails. It still seems to crash when
accessing user info, so something is still missing. Either way, it
seems valid to skip LFS if it just won't work.

Change summary

pkg/backend/repo.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Detailed changes

pkg/backend/repo.go 🔗

@@ -190,7 +190,8 @@ func (d *Backend) ImportRepository(_ context.Context, name string, user proto.Us
 
 		client := lfs.NewClient(ep)
 		if client == nil {
-			return fmt.Errorf("failed to create lfs client: unsupported endpoint %s", endpoint)
+			d.logger.Warn("failed to create lfs client: unsupported endpoint", "endpoint", endpoint)
+			return nil
 		}
 
 		if err := StoreRepoMissingLFSObjects(ctx, r, d.db, d.store, client); err != nil {