Page MenuHomePhabricator

Changes in github.com mirror behavior - BlueSpiceSmartList & BlueSpiceSmartlist
Closed, ResolvedPublic

Description

Hi!

Have there been any recent changes on the way Gerrit repos are mirrored to github? A few hour ago (as far as I can tell) the master branch of https://github.com/wikimedia/mediawiki-extensions-BlueSpiceSmartList has changed significantly. It was reset to a 7 year old version.

I believe this may be connected to the fact, that on Gerrit there seem to be two versions of that repo, with different casing:

  1. https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/BlueSpiceSmartlist/ -> Lower case l, 7 year old master branch
  2. https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/BlueSpiceSmartList/ -> Upper case L, 9 days old master branch

Unfortunately, I don't know why this is the case.

To me this seems to be the most likely cause of the behavior on github.com, as unlike Gerrit, it has case insensitive repo names.

Can you please help me figure out how to fix that? You can also delete the outdated repo, if that helps.

Event Timeline

Peachey88 renamed this task from Changes in github.com mirror behavior to Changes in github.com mirror behavior - BlueSpiceSmart{L|l}ist.May 21 2025, 11:05 AM

Hi, I have restarted Gerrit yesterday at 2025-05-21 07:24:48 UTC which triggers a full replication of all repositories. The corresponding replication logs from grep -i BlueSpiceSmartList /var/log/gerrit/replication_log.2025-05-21|grep github.com:

[2025-05-21 07:25:31,689] scheduling replication mediawiki/extensions/BlueSpiceSmartList:[..all..] => git@github.com:wikimedia/mediawiki-extensions-BlueSpiceSmartList
[2025-05-21 07:25:31,689] scheduled mediawiki/extensions/BlueSpiceSmartList:[..all..] => [0b5805a6] push git@github.com:wikimedia/mediawiki-extensions-BlueSpiceSmartList [..all..] to run after 15s
[2025-05-21 07:25:31,690] scheduling replication mediawiki/extensions/BlueSpiceSmartlist:[..all..] => git@github.com:wikimedia/mediawiki-extensions-BlueSpiceSmartlist
[2025-05-21 07:25:31,690] scheduled mediawiki/extensions/BlueSpiceSmartlist:[..all..] => [584495cb] push git@github.com:wikimedia/mediawiki-extensions-BlueSpiceSmartlist [..all..] to run after 15s
[2025-05-21 07:26:57,229] Replication to git@github.com:wikimedia/mediawiki-extensions-BlueSpiceSmartList started... [CONTEXT pushOneId="0b5805a6" ]
[2025-05-21 07:26:57,339] Replication to git@github.com:wikimedia/mediawiki-extensions-BlueSpiceSmartlist started... [CONTEXT pushOneId="584495cb" ]
[2025-05-21 07:26:57,486] Replication to git@github.com:wikimedia/mediawiki-extensions-BlueSpiceSmartList completed in 256ms, 85540ms delay, 0 retries [CONTEXT pushOneId="0b5805a6" ]
[2025-05-21 07:26:57,616] Push to git@github.com:wikimedia/mediawiki-extensions-BlueSpiceSmartlist references: RemoteRefUpdate{refSpec=refs/heads/master:refs/heads/master, status=NOT_ATTEMPTED, id=(null)..AnyObjectId[60ed059ac51bc307c168b9111a6dd4e569cf385d], force=yes, delete=no, ffwd=no} [CONTEXT pushOneId="584495cb" ]
[2025-05-21 07:26:58,164] Replication to git@github.com:wikimedia/mediawiki-extensions-BlueSpiceSmartlist completed in 824ms, 85648ms delay, 0 retries [CONTEXT pushOneId="584495cb" ]

The uppercase and lower cases version on GitHub:

Both point to the upper case mediawiki-extensions-BlueSpiceSmartList.

When the full replication occurred the lower case version happened to terminate later and thus override whatever was set:

[2025-05-21 07:26:57,486] BlueSpiceSmartList completed 
[2025-05-21 07:26:58,164] BlueSpiceSmartlist completed

My guess is the redirect on GitHub is because the lower case version got renamed and I don't know of any way to drop that redirection.

Anyway the fix is to prevent the replication from reading the lower case version. That can be done by preventing the group mediawiki-replication from reading the repository which we do by changing the parent repo to All-Archived-Projects.

Mentioned in SAL (#wikimedia-releng) [2025-05-22T11:37:20Z] <hashar> gerrit: changed parent of mediawiki/extensions/BlueSpiceSmartlist (lower case L) to All-Archived-Projects to prevent it from being replicated to GitHub | T394903

Mentioned in SAL (#wikimedia-releng) [2025-05-22T11:39:38Z] <hashar> Triggered replication of mediawiki/extensions/BlueSpiceSmartlist and mediawiki/extensions/BlueSpiceSmartList to fix https://github.com/wikimedia/mediawiki-extensions-BlueSpiceSmartlist | T394903

I have replicated:

The lower case version which now only replicates to gerrit-replica.wikimedia.org:

$ ssh -p 29418 gerrit.wikimedia.org replication start mediawiki/extensions/BlueSpiceSmartlist --wait
Replicate mediawiki/extensions/BlueSpiceSmartlist refs ..all.. to gerrit2002.wikimedia.org, Succeeded! (OK)
Replication of mediawiki/extensions/BlueSpiceSmartlist ref ..all.. completed to 1 nodes, 
----------------------------------------------
Replication completed successfully!

Confirming it is no more replicated to GitHub.

And the upper case version still mirrors to GitHub:

$ ssh -p 29418 gerrit.wikimedia.org replication start mediawiki/extensions/BlueSpiceSmartList --wait
Replicate mediawiki/extensions/BlueSpiceSmartList refs ..all.. to gerrit2002.wikimedia.org, Succeeded! (OK)
Replicate mediawiki/extensions/BlueSpiceSmartList refs ..all.. to github.com, Succeeded! (OK)
Replication of mediawiki/extensions/BlueSpiceSmartList ref ..all.. completed to 2 nodes, 
----------------------------------------------
Replication completed successfully!

Both https://github.com/wikimedia/mediawiki-extensions-BlueSpiceSmartlist and the canonical https://github.com/wikimedia/mediawiki-extensions-BlueSpiceSmartList looks good now!

What I wonder is why we/I did not delete the lower case version. Possibly because we want to keep an history of the changes/code review but those references should be movable from the lower to the upper case version and the lower case version be deleted?

hashar renamed this task from Changes in github.com mirror behavior - BlueSpiceSmart{L|l}ist to Changes in github.com mirror behavior - BlueSpiceSmartList & BlueSpiceSmartlist.May 22 2025, 11:43 AM

Thank you very much!

What I wonder is why we/I did not delete the lower case version. Possibly because we want to keep an history of the changes/code review but those references should be movable from the lower to the upper case version and the lower case version be deleted?

Unfortunately, I can not tell. I have compared the two repos again and pushed BlueSpiceSmart_l_ist:REL1_30 to BlueSpiceSmart_L_ist:REL1_30. So we can now safely remove BlueSpiceSmart_l_ist entirely.

I will look at the old repo next week (when I have a fresh mind). At first glance I think I want to:

  • move the refs/changes/* from the old repo to the new one
  • reindex both repos
  • check old changes can still be found
  • and then delete the old repo :)

I have added the permissions Forge Author Identity and Forge Committer Identity.

I went to fetch refs/changes/*/* from the old repo (lower case) and pushed them to the new one (upper case) using:

git push -v -o notedb=allow origin refs/remotes/old/changes/*:refs/changes/*

I have merged the notes:

$ git fetch origin refs/notes/review
From https://gerrit.wikimedia.org/r/mediawiki/extensions/BlueSpiceSmartList
 * branch            refs/notes/review -> FETCH_HEAD

$ git checkout -b review FETCH_HEAD
Switched to a new branch 'review'

$ git fetch old refs/notes/review
From https://gerrit.wikimedia.org/r/mediawiki/extensions/BlueSpiceSmartlist
 * branch            refs/notes/review -> FETCH_HEAD

Merged them:

$ git merge --allow-unrelated-histories FETCH_HEAD
Merge made by the 'ort' strategy.
 014e2f87c7c5d8f4bc8a823e5e4393cd40d334eb | 7 +++++++
 089dff2deeeae45deeebb2527577639c5ff3b807 | 7 +++++++
 0a38f1486f4880647929fae9ccebfceaa8d06885 | 7 +++++++
 0df05132bcf3ecfeb99609d81173a13fbccde6b7 | 7 +++++++
 132c83bc3b3c8d5d5119dd095a5208ef19958c0f | 7 +++++++
 3ab3f1513790a43cedeb10038072e3d13e094117 | 7 +++++++
 429f49da524f83c1fa451069ea3cd52c694cd1df | 7 +++++++
 572ef3805a4729037e3fb649f2589daddaeb0408 | 7 +++++++
 57d2fe0ad17bee7cc559076f20161d10a36ff0d0 | 8 ++++++++
 63075e61ff89d5df2766d52cf6f3cb7f48a068d6 | 7 +++++++
 6a830e9bcdbd0f7fc3ebca45038a264efdccc105 | 7 +++++++
 7185f70834e40fbd50575e9554cab40fae746b2f | 7 +++++++
 7713eef24fa7022453f658af50c406f2fe3e2f02 | 7 +++++++
 84195cf78129062edab07c85192fc76e43ae7551 | 7 +++++++
 8d15fe4d52bf33bf7bbd48a3cab9d2cdb37f3996 | 7 +++++++
 8feaf15bfdb09b137849285bcdb586979791af61 | 7 +++++++
 90df0720135818f6b2d40515da1b1ab9d5901749 | 9 +++++++++
 90e2c5c12aa2518476db32a9827080bab2e80743 | 7 +++++++
 9aa6accab72fa16e8f87ba3eea8a43b33aec1b59 | 7 +++++++
 a854a952703ab2098ef834f52ed09aea1ff2c0c2 | 7 +++++++
 b67fc53b3ed88a4735d5ad02ffe84d9a9a320208 | 7 +++++++
 c49892d837e31be42561e7f43d2c47a9c867a39b | 7 +++++++
 d466d5acfac5a40a00f576ccf96124ad0c341018 | 7 +++++++
 d95c2fb2a5abc5de71a344f242a92cb419e3660c | 7 +++++++
 dc6dfddbbd9d0ce42a19a14f6f4cd5e61ccaffba | 7 +++++++
 ded6d111d8bb135f98600b3a446bed2d65279ea8 | 7 +++++++
 e3b81b865c68ca587b589bf2f7e1450dd9fd7f6a | 7 +++++++
 e6ed7822ed8690014705e36d366bce3736ba8d49 | 7 +++++++
 ebe5fc204561231e46488971129f823ebc1ab83f | 7 +++++++
 29 files changed, 206 insertions(+)
 create mode 100644 014e2f87c7c5d8f4bc8a823e5e4393cd40d334eb
 create mode 100644 089dff2deeeae45deeebb2527577639c5ff3b807
 create mode 100644 0a38f1486f4880647929fae9ccebfceaa8d06885
 create mode 100644 0df05132bcf3ecfeb99609d81173a13fbccde6b7
 create mode 100644 132c83bc3b3c8d5d5119dd095a5208ef19958c0f
 create mode 100644 3ab3f1513790a43cedeb10038072e3d13e094117
 create mode 100644 429f49da524f83c1fa451069ea3cd52c694cd1df
 create mode 100644 572ef3805a4729037e3fb649f2589daddaeb0408
 create mode 100644 57d2fe0ad17bee7cc559076f20161d10a36ff0d0
 create mode 100644 63075e61ff89d5df2766d52cf6f3cb7f48a068d6
 create mode 100644 6a830e9bcdbd0f7fc3ebca45038a264efdccc105
 create mode 100644 7185f70834e40fbd50575e9554cab40fae746b2f
 create mode 100644 7713eef24fa7022453f658af50c406f2fe3e2f02
 create mode 100644 84195cf78129062edab07c85192fc76e43ae7551
 create mode 100644 8d15fe4d52bf33bf7bbd48a3cab9d2cdb37f3996
 create mode 100644 8feaf15bfdb09b137849285bcdb586979791af61
 create mode 100644 90df0720135818f6b2d40515da1b1ab9d5901749
 create mode 100644 90e2c5c12aa2518476db32a9827080bab2e80743
 create mode 100644 9aa6accab72fa16e8f87ba3eea8a43b33aec1b59
 create mode 100644 a854a952703ab2098ef834f52ed09aea1ff2c0c2
 create mode 100644 b67fc53b3ed88a4735d5ad02ffe84d9a9a320208
 create mode 100644 c49892d837e31be42561e7f43d2c47a9c867a39b
 create mode 100644 d466d5acfac5a40a00f576ccf96124ad0c341018
 create mode 100644 d95c2fb2a5abc5de71a344f242a92cb419e3660c
 create mode 100644 dc6dfddbbd9d0ce42a19a14f6f4cd5e61ccaffba
 create mode 100644 ded6d111d8bb135f98600b3a446bed2d65279ea8
 create mode 100644 e3b81b865c68ca587b589bf2f7e1450dd9fd7f6a
 create mode 100644 e6ed7822ed8690014705e36d366bce3736ba8d49
 create mode 100644 ebe5fc204561231e46488971129f823ebc1ab83f

And pushed the notes:

$ git push -o notedb=allow origin HEAD:refs/notes/review
Enumerating objects: 99, done.
Counting objects: 100% (99/99), done.
Delta compression using up to 8 threads
Compressing objects: 100% (37/37), done.
Writing objects: 100% (89/89), 11.03 KiB | 11.03 MiB/s, done.
Total 89 (delta 54), reused 86 (delta 52), pack-reused 0
remote: Resolving deltas: 100% (54/54)
remote: Processing changes: refs: 1, done    
remote: commit 6a2752f: warning: subject >100 characters; use shorter first paragraph
To ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceSmartList.git
   8f0719e..6a2752f  HEAD -> refs/notes/review

I then triggered a reindexing of the project with ssh -p 29418 gerrit.wikimedia.org gerrit index changes-in-project mediawiki/extensions/BlueSpiceSmartList.

And it can now find https://gerrit.wikimedia.org/r/c/mediawiki/extensions/BlueSpiceSmartList/+/392024 which was done on the old repository. I guess one day I will have to write a guide about how to merge the history of Gerrit projects.

This I guess means I should be able to delete the old mediawiki/extensions/BlueSpiceSmartlist and claim victory.

I also took the liberty to delete {rEBSR} (BlueSpiceSmartlist) in Phabricator Diffusion so only rEBTX extension-BlueSpiceSmartList (BlueSpiceSmartList) is left.