Page MenuHomePhabricator

Phabricator translations can no more be received due to decommissioning of git-ssh
Closed, ResolvedPublic

Description

T296022 has removed the SSH git-ssh.wikimedia.org endpoint which was used to push to Phabricator repository. @Nikerabbit mentioned that broke publishing of TranslateWiki translations and their system only support ssh for authentication.

It pushed to ssh://vcs@git-ssh.wikimedia.org/source/phabricator-translations.git

The repository is a submodule of Phabricator deployment repository: https://gerrit.wikimedia.org/r/plugins/gitiles/phabricator/deployment/+/refs/heads/wmf/stable/.gitmodules

Given the deployment repo is on Gerrit and other submodules are on Gerrit, we should migrate ssh://vcs@git-ssh.wikimedia.org/source/phabricator-translations.git to Gerrit with push rights granted to whatever user TranslateWiki is using (l10n-bot?).

(*) https://www.mediawiki.org/wiki/Git/Creating_new_repositories#Importing_from_an_existing_repository

Event Timeline

hashar updated the task description. (Show Details)

git-ssh had been deactivated for at least a week but what happened today additionally is that I actively set the "URI" under "manage repository" in DIffusion to "no I/O" and deleted the service from DNS.

This changed it from "time out" to a new more active error which made it more visible.

I imported the repo into gitlab but hashar voiced a preference for having it on Gerrit together with other Phabricator repos.

No worries, I will create the repo, add L10N-bot sync up with @Nikerabbit to confirm the sync up works again and also normalize the URLs.

Change 845019 had a related patch set uploaded (by Hashar; author: Hashar):

[phabricator/translations@refs/meta/config] Allow L10n-bot to push to wmf/stable branch

https://gerrit.wikimedia.org/r/845019

Change 845019 merged by Hashar:

[phabricator/translations@refs/meta/config] Allow L10n-bot to push to wmf/stable branch

https://gerrit.wikimedia.org/r/845019

I have imported the repository to Gerrit following the documentation at https://www.mediawiki.org/wiki/Git/Creating_new_repositories#Importing_from_an_existing_repository

$ git clone --mirror https://phabricator.wikimedia.org/source/phabricator-translations.git
Cloning into bare repository 'phabricator-translations.git'...
remote: Enumerating objects: 14057, done.
remote: Counting objects: 100% (14057/14057), done.
remote: Compressing objects: 100% (8194/8194), done.
remote: Total 14057 (delta 10527), reused 9057 (delta 5859)
Receiving objects: 100% (14057/14057), 13.52 MiB | 1.56 MiB/s, done.
Resolving deltas: 100% (10527/10527), done.

$ cd phabricator-translations.git

phabricator-translations.git(BARE:wmf/stable)$ git remote add gerrit ssh://gerrit.wikimedia.org:29418/phabricator/translations
phabricator-translations.git(BARE:wmf/stable)$ git push --mirror gerrit

I had to further adjust permissions cause I missed a few to do the import and eventually everything got pushed with the exception of refs/meta/config which the Gerrit repository configuration

phabricator-translations.git(BARE:wmf/stable)$ git push --mirror gerrit
remote: error: branch refs/meta/config:
remote: Cannot delete project configuration from 'refs/meta/config'
remote: error: branch refs/meta/config:
remote: You need 'Delete Reference' rights or 'Push' rights with the 
remote: 'Force Push' flag set to delete references.
remote: User: hashar
remote: Contact an administrator to fix the permissions
remote: Processing changes: refs: 1, done    
To ssh://gerrit.wikimedia.org:29418/phabricator/translations
 ! [remote rejected] refs/meta/config (prohibited by Gerrit: not permitted: delete)
error: failed to push some refs to 'ssh://gerrit.wikimedia.org:29418/phabricator/translations'

I have deactivated the Phabricator repository https://phabricator.wikimedia.org/source/phabricator-translations/manage/ .

Change 845459 had a related patch set uploaded (by Hashar; author: Hashar):

[phabricator/deployment@wmf/stable] .gitmodules: translations migrated to Gerrit

https://gerrit.wikimedia.org/r/845459

@Nikerabbit the new repository is https://gerrit.wikimedia.org/r/phabricator/translations. The L10n bot has been granted [[ https://gerrit.wikimedia.org/r/admin/repos/phabricator/translations,access | permission to push to the wmf/stable branch ]].

You should thus be able to adjust the TranslateWiki configuration to push to ssh://gerrit.wikimedia.org:29418/phabricator/translations

Change 845459 merged by Brennen Bearnes:

[phabricator/deployment@wmf/stable] .gitmodules: translations migrated to Gerrit

https://gerrit.wikimedia.org/r/845459

Nikerabbit triaged this task as Medium priority.Oct 27 2022, 8:19 AM

Change 858629 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[translatewiki@master] Update repository for phabricator translation

https://gerrit.wikimedia.org/r/858629

abi_ changed the task status from Open to In Progress.Nov 28 2022, 5:19 AM
abi_ assigned this task to hashar.

Change 858629 merged by jenkins-bot:

[translatewiki@master] Update repository for phabricator translation

https://gerrit.wikimedia.org/r/858629

Change 861836 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[translatewiki@master] Add auto-merge for phabricator

https://gerrit.wikimedia.org/r/861836

Change 861836 merged by jenkins-bot:

[translatewiki@master] Add auto-merge for phabricator

https://gerrit.wikimedia.org/r/861836

L10n-bot doesn't do a direct push in Gerrit, so we would need the default l10n-bot(-watcher) permissions and i18n-check on this repo.

We could also look into making it into a direct push, but I think former is preferable.

Change 863356 had a related patch set uploaded (by Hashar; author: Hashar):

[phabricator/translations@refs/meta/config] Grant l10n bot rights

https://gerrit.wikimedia.org/r/863356

Change 863804 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] Add l10n-bot to phabricator/translations

https://gerrit.wikimedia.org/r/863804

L10n-bot doesn't do a direct push in Gerrit, so we would need the default l10n-bot(-watcher) permissions and i18n-check on this repo.

We could also look into making it into a direct push, but I think former is preferable.

I have completely missed l10n-bot needed some extra permissions and a job to be triggered. Proposals:

Can we pair together to deploy those changes, trigger the l10n-bot and verify it is working properly?

Change 863356 merged by Hashar:

[phabricator/translations@refs/meta/config] Grant l10n bot rights

https://gerrit.wikimedia.org/r/863356

Change 863804 merged by jenkins-bot:

[integration/config@master] Add l10n-bot to phabricator/translations

https://gerrit.wikimedia.org/r/863804

Related commit a09b626a pushed by brennen (author: Antoine Musso):

[ repos/phabricator/deployment@wmf/stable ] .gitmodules: translations migrated to Gerrit