Page MenuHomePhabricator

Improve OCR: Move ws-google-ocr repository to Gerrit
Closed, ResolvedPublic

Description

As a Google OCR user, I want the repository moved to Gerrit, so that the code is handled in a more standardized way.

Background: The https://phabricator.wikimedia.org/source/tool-wikisource-ocr/ repository should be moved to Gerrit. It dates from when we thought things were going to move to Phabricator, but that's not happening now, and it'll be easier to work on in Gerrit. Should we also rename it to wikisource-ocr, in preparation for including other OCR backends other than the Cloud Vision API?

Acceptance Criteria:

  • Move ws-google-ocr repository to Gerrit

Steps

  • Create new group in gerrit
  • Create new repo in gerrit
  • Temporarily add "forge committer identity" and "push" rights for whatever group for the person that does the initial push
  • Push up all branches to gerrit with their full history
  • Remove temporary rights
  • Rename old Phabricator repo
  • Switch old Phabricator repo to be a mirror of the new Gerrit repo

Event Timeline

ifried renamed this task from Move ws-google-ocr repository to Gerrit to Improve OCR: Move ws-google-ocr repository to Gerrit.Mar 12 2020, 4:46 PM
ifried updated the task description. (Show Details)

Even if we do build on this tool to make a multiple-OCR-engine tool, it sounds like we'll start with a new tool and new repo. So this repo should probably just be moved as-is.

@thcipriani - Any idea how to move a repo from Phabricator to Gerrit (without losing the history)? Or who would know?

@thcipriani - Any idea how to move a repo from Phabricator to Gerrit (without losing the history)? Or who would know?

Same way you would with any new git repo - add the new remote, and push everything to it ;)

With gerrit, you might need to enable force push/forge committer rights temporarily though

@thcipriani - Any idea how to move a repo from Phabricator to Gerrit (without losing the history)? Or who would know?

Same way you would with any new git repo - add the new remote, and push everything to it ;)

With gerrit, you might need to enable force push/forge committer rights temporarily though

+1

Steps are:

  1. Create new repo in gerrit
  2. Temporarily add "forge committer identity" and "push" rights for whatever group for the person that does the initial push
  3. Push up all branches to gerrit with their full history
  4. Remove temporary rights
  5. Use gerrit form that point forward

@thcipriani - Does this look right for creating the new repo?

ssh -p 29418 gerrit.wikimedia.org gerrit create-project --require-change-id --owner=labs-tools-wikisource-ocr --parent=labs/tools --description="'Toolforge tool for handling Wikisource OCR requests'" labs/tools/wikisource-ocr

I went ahead and created the gerrit repo and the owner group.

@Reedy - How do we temporarily add "forge committer identity" and "push" rights to the labs-tools-wikisource-ocr group? Does that require a Gerrit administrator?

@Reedy - How do we temporarily add "forge committer identity" and "push" rights to the labs-tools-wikisource-ocr group? Does that require a Gerrit administrator?

Not sure offhand what rights are needed. You can do it via https://gerrit.wikimedia.org/r/#/admin/projects/labs/tools/wikisource-ocr,access - click edit and if you can do "save changes", you have the rights, otherwise it'll show "save for review", and someone else can merge it

This comment was removed by kaldari.

@Samwilson - I think the last steps needed are to delete the existing Phabricator repo and create a new mirror of the Gerrit repo (with the new name). I don't have adequate permissions to delete the existing repo, but I think you do.

There is a 'delete' button for the repo, and it gives us this:

To permanently destroy this repository, run this command from the command line:

phabricator/ $ ./bin/remove destroy R1966

Repositories can not be permanently destroyed from the web interface. See Permanently Destroying Data in the documentation for more information.

So I guess a Phabricator sysadmin has to do it.

In the meantime I've added a note about the new repo, and disabled it (although I'm not quite sure what that does).

@MarcoAurelio I think you have done this in the past; are you able to help us here?

T250312 raised the point that we should have a dedicated Phabricator project for this tool. From the discussion above, it sounds like we might want to call it "Wikisource OCR" instead of "Wikisource Google OCR"?

@mmodell - Looks like MarcoAurelio is MIA. Any chance you could delete the https://phabricator.wikimedia.org/source/tool-ws-google-ocr/ repo for us?

hmm, who else is a Phabricator admin? @Aklapper?

@mmodell - Looks like MarcoAurelio is MIA. Any chance you could delete the https://phabricator.wikimedia.org/source/tool-ws-google-ocr/ repo for us?

Screenshot 2020-04-17 at 16.11.55.png (816×1 px, 161 KB)

Phab reckons @Samwilson can do it

Shouldn't we just switch it to mirror from gerrit and keep phabricator as a mirror of the gerrit repo? It's not necessary to delete the repo in order to switch it to mirroring.

@mmodell - Sure, if it's possible to change the name at the same time. It's no longer specific to Google, so it would be nice to rename it to something like tool-wikisource-ocr (similar to the new gerrit repo).

It seems that it's possible to change the repo name here (but not delete it). I didn't realise that earlier. So I've changed its name (which unfortunately also breaks existing links to https://phabricator.wikimedia.org/source/tool-ws-google-ocr ). The new repo is rWSOCR.

I'm not sure how to set up mirroring; @mmodell can you do that?

kaldari updated the task description. (Show Details)
kaldari claimed this task.