-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor mirror code & fix StartToMirror
#18904
Conversation
- Use the MirrorID as index(SQL uses `id` column not the `repo_id`). Passes the Mirror ID's into the Sync functions.
I think this is right because one push mirror repository could have serval remote repositories. But this is potential break for those have tasks in the mirror queue. |
I think because of this PR the |
Codecov Report
@@ Coverage Diff @@
## main #18904 +/- ##
=======================================
Coverage ? 46.66%
=======================================
Files ? 854
Lines ? 122576
Branches ? 0
=======================================
Hits ? 57199
Misses ? 58485
Partials ? 6892
Continue to review full report at Codecov.
|
StartToMirror
Added a fix to |
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
make L-G-T-M work. |
* giteaoffical/main: Refactor mirror code & fix `StartToMirror` (go-gitea#18904)
* Use MirrorID instead of RepoID - Use the MirrorID as index(SQL uses `id` column not the `repo_id`). Passes the Mirror ID's into the Sync functions. * Check for MirrorID == 0 * Fix `StartToMirror` + refactor * Update services/mirror/mirror.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
id
column not therepo_id
, which currently seems to be expected). Passes the Mirror ID's into the Sync functions.StartToMirror
to start Pull sync request for given repo.I'm not actually sure if this fixes issues like #18860, but it's regardless a bug IMO as a repo could have multiple push mirrors.