-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Don't run push mirrors for archived repos #27140
Conversation
Don't know if that is really not the preferred behaviour. If you add a new push mirror for an archived repo I would expect that the mirrored-to repo gets updated. |
Considering an archived repo is read-only, I don't see it should support adding more push mirrors or do the push. I am neutral for this change, Another question is that what's the behavior of the "pull mirror"? Should it pull for archived repo? |
I aslo think it's unnecessary to push to upstream when a repository has become archived one. Since there will be no new commits pushed to this archived repository and it will always keep the last commits not changed. Why it should keep to push to remote? It's wasting cpu and memory. I think the right way to fix this is to disable the buttons on the UI and API to disallow change the push mirrors information. These push mirrors remote addresses should not be removed because maybe the repositories will be converted back to common mirror repositories. |
Done
I think the SQL is simple enough. Joins are just basic SQL that everyone who knows SQL should understand. We should not load more from the Database than needed.
You can't archive a pull mirror. |
Could we just disable the mirrors' buttons but keep the information displayed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
I would suggest not indenting the {{else}}
block, to avoid unnecessary conflicts.
Please resolve conflict :) |
stale for long time, so have to dismiss the approval.
@JakobDev Please resolve conflicts :) |
This PR is not easy to be backport to v1.21, so I just removed the label. |
* giteaofficial/main: [skip ci] Updated translations via Crowdin Show in Web UI if file is vendored and generated (go-gitea#28620) Don't reload timeline page when (un)resolving or replying conversation (go-gitea#28654) Allow to sync tags from admin dashboard (go-gitea#28045) Don't run push mirrors for archived repos (go-gitea#27140) Only migrate the first 255 chars of a Github issue title (go-gitea#28902) Fix hardcoded GitHub icon used as migrated release avatar (go-gitea#28910) [skip ci] Updated translations via Crowdin Update go dependencies and fix go-git (go-gitea#28893)
Fixes https://codeberg.org/forgejo/forgejo/issues/612 At the moment push mirrors are still run if a repo is archived. This PR fixes this.
Fixes https://codeberg.org/forgejo/forgejo/issues/612 At the moment push mirrors are still run if a repo is archived. This PR fixes this.
Fixes https://codeberg.org/forgejo/forgejo/issues/612
At the moment push mirrors are still run if a repo is archived. This PR fixes this.