Page MenuHomePhabricator

GitHub EntitySchema repository is getting mirrored from both EntitySchema and WikibaseSchema on Gerrit
Closed, ResolvedPublic

Description

A couple of years ago, we renamed this extension from WikibaseSchema to EntitySchema. Apparently, this left the GitHub mirroring configuration in a confused state where both EntitySchema and WikibaseSchema are getting mirrored to the GitHub repo; the “real” EntitySchema repository contents are periodically overwritten with WikibaseSchema’s remove everything:

image.png (1×1 px, 221 KB)

And if you visit the repository during that time, it appears empty:
image.png (926×1 px, 230 KB)

We should fix this.

Event Timeline

Gerrit keeps replicating Read-only repositories and GitHub honors the rename via a redirect hence the clash. T333029 is a similar issue: the Gerrit repository mediawiki/tools/cli has been marked Read-only, it has migrated to Gitlab which also does a replication under the same name.

I have filed a task to prevent Gerrit from replicating archived tasks: T351543. There are multiple ways to address it (including moving repos under an archived/ namespace).

Mentioned in SAL (#wikimedia-releng) [2024-06-13T11:31:50Z] <hashar> gerrit: reparent mediawiki/extensions/WikibaseSchema from mediawiki/extensions to All-Archived-Projects (T351543) to prevent GitHub replication # T367396

hashar claimed this task.

I have checked the Gerrit replication log and pasted it at P64879

A replication to GitHub has been scheduled this morning:

[2024-06-13 10:10:24,277] scheduling replication mediawiki/extensions/WikibaseSchema:[..all..] => git@github.com:wikimedia/mediawiki-extensions-WikibaseSchema
[2024-06-13 10:10:24,278] scheduled mediawiki/extensions/WikibaseSchema:[..all..] => [99946713] push git@github.com:wikimedia/mediawiki-extensions-WikibaseSchema [..all..] to run after 15s

That was triggered when I have restarted Gerrit since we have gerrit.replicateOnStartup which causes the replication to replicates every single repository on every startup.
Not shown in the linked paste, EntitySchema is replicated:

[2024-06-13 10:12:19,334] Replication to git@github.com:wikimedia/mediawiki-extensions-EntitySchema completed in 282ms, 116262ms delay, 0 retries [CONTEXT pushOneId="5ca7aa5d" ]

WikibaseSchema is pushed a couple minutes later (since it comes Alphabetically after EntitySchema):

[2024-06-13 10:14:07,943] Replication to git@github.com:wikimedia/mediawiki-extensions-WikibaseSchema completed in 1253ms, 222411ms delay, 0 retries [CONTEXT pushOneId="99946713" ]

I have later restarted Gerrit again which did not trigger a replication to GitHub since the repository no more allows mediawiki-replication group to read from it.

I believe the issue to be solved now thanks to the analysis of the problem I have made in T351543 and for which Tyler provided an implementation (the All-Archived-Projects project).