You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Roadmap 2025/07 Retry when failed to push because of a locked mutex
As the DevOps of my team, I want to retry the push if an error occurred because the ref has been locked by another RemoteSyncer.
What to do
1. Add a retry time number argument
Provide a new retryNumber: int argument to the Push() function.
Roadmap 2025/07 Retry when failed to push because of a locked mutex
As the DevOps of my team, I want to retry the push if an error occurred because the ref has been locked by another RemoteSyncer.
What to do
1. Add a retry time number argument
Provide a new
retryNumber: int
argument to thePush()
function.syngit/internal/interceptor/git_pusher.go
Line 44 in 4d6bc00
This will be transmitted to the actual push function.
syngit/internal/interceptor/git_pusher.go
Line 104 in 4d6bc00
2. Catch the lock error
If the git push error message contains "cannot lock ref", then call
It will clone the repo with the data that have been added during the lock time.
3. Set the default retry number
When calling the function for the first time, set the
retryNumber
to3
by default.syngit/internal/interceptor/webhook_request_checker.go
Line 470 in 4d6bc00
Additional context
If you have any questions, please tag @damsien.
The text was updated successfully, but these errors were encountered: