fix(mirror): skip LFS instead of failing to mirror a repo #525
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Specifically noticed this when trying to import and mirror a repository using a
git@github.com:user/repo
clone URL, which results in the LFS client being nil. It seemed helpful to keep the error as a warning, but otherwise allow mirroring to continue. There might be a better way to handle this, this just lines up more with how the job.mirror code seems to work at the moment.