In T317820#8340198, @bd808 wrote:In T317820#8333057, @hashar wrote:For repositories hosted on our GitLab, I am not sure we need to replicate them back to GitHub since https://gitlab.wikimedia.org/repos/releng/blubber seems to give a good exposure to the world wide web. If somehow a repository requires replication to GitHub for running 3rd party integrations, that is to be determinated.
I think this assumption is worth a more public discussion for repos other than Blubber. GitLab supports push mirroring. Having a consolidated view of commit activity across many Wikimedia related git repos visible on a user's GitLab profile is actually a benefit for those members of our community who take advantage of it. GitHub mirrors for MediaWiki repos have long been advertised via Extension detail pages among other locations. Composer package updates are currently automated using GitHub hooks. The community might decide that we no longer want to be associated with GitHub, but until that is the case I think it is reasonably easy to continue to mirror repos to GitHub after they have been moved from Gerrit to our local GitLab.
Description
Related Objects
Event Timeline
Having the ability to inherit project config from the parent project (https://gitlab.com/gitlab-org/gitlab/-/issues/28593) would make operations like this easier to setup for large swaths of our hosted repos.
How to stop Gerrit from doing it: does archiving a repo in Gerrit mean it's still mirrored from Gerrit to GitHub if the GitHub repo exists? If that's the case: can we modify replication settings to stop it?
In Gerrit, the GitHub replica is configured with a group which is granted the read permission:
profile::gerrit::replication: github: url: 'git@github.com:wikimedia/${name}' authGroup: 'mediawiki-replication' mirror: false push: - '+refs/heads/*:refs/heads/*' - '+refs/tags/*:refs/tags/*' ...
From replication plugin config doc:
**remote.NAME.authGroup
Specifies the name of a group that the remote should use to access the repositories. ...
In the project administration web interface the read access can be specified for this group to control if a project should be replicated or not to the remote.
The permission is granted in https://gerrit.wikimedia.org/r/admin/repos/All-Projects,access which ALLOW the Read permission on refs/*. Thus all projects should depend on it and thus are replicated.
When archiving a repository (via Projects-Cleanup), we simply update the description to prefix it with [ARCHIVED] and mark the repository Read-only. It is still replicated though. We would need to reparent it from All-Projects to a new All-Archived-Projects which would BLOCK or DENY the Read permission to mediawiki-replication group.