If an error occurs during pull mirroring, display 'Error' highlight for that repository
Problem to solve
When using pull mirroring, if an error occurs, there's no visibility. Detection relies on the developers noticing that the repo is no longer is sync.
If push mirroring fails, GitLab will display an “Error” highlight for that repository
One use case for pull mirroring is setting up external CI. If the mirroring is failing, then CI jobs don't get run.
Permissions is one reason this can happen such as this issue.
For example, merging a branch to master on a gitHub repo: the branch gets deleted, master gets updated, but the push fails with:
You are not allowed to push code to protected branches on this project.
in gitlab-shell.log
The UI shows:
But the repo isn't in sync at all. Gitlab:
In GitHub, bbe2de9 Add README
has been merged into master
and it should show as c9a2b56
and the other branch should have been deleted from GitLab.
Github:
$ git pull --rebase -p
From github.com:bprescott-git/gitlabci
- [deleted] (none) -> origin/readme-20200311
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
7fb60bc..c9a2b56 master -> origin/master
Updating 7fb60bc..c9a2b56
Fast-forward
README.md | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 README.md
Current branch master is up-to-date.
$ git branch --remote -v
origin/master c9a2b56 Merge pull request #1 from bprescott-git/readme-20200311
$ git log --oneline | head -3
c9a2b56 Merge pull request #1 from bprescott-git/readme-20200311
bbe2de9 Add README
7fb60bc skeleton CI for GitLab
Intended users
Further details
If one of our features isn't working, surfacing that to the user is pretty key to it being a lovable feature.
If the UI appears to be saying 'all is good' but it isn't .. that's really frustrating.