Fail remote mirror if LFS sync fails
What does this MR do and why?
Previously for a remote mirror update, UpdateRemoteMirrorService
would
ignore the state of Lfs::PushService#execute
, which prevented a
project maintainer from knowing that an actual problem existed with the
sync.
We now fail the mirror, while allowing the Git push to continue. This is
guarded behind the remote_mirror_fail_on_lfs
feature flag, and
additional logging is added to track when this happens.
Relates to #340482 (closed)
Screenshots or screen recordings
How to set up and validate locally
Until !77326 (merged) is merged:
- Set up a Azure DevOps account in dev.azure.com (https://andrewlock.net/creating-a-git-repo-with-azure-repos-and-trying-out-git-lfs/).
- Create a project.
- Set up push mirroring to an Azure mirror.
- Enable the feature flag:
Feature.enable(:remote_mirror_fail_on_lfs)
. - Push a LFS file to the repository. Go to Repository -> Mirroring -> Update Now.
- Look for the error message.
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Stan Hu