Page MenuHomePhabricator

Create a new repository for kubernetes tool under a new directory in gerrit that doesn't exist yet
Closed, ResolvedPublic

Description

I am trying to create a Gerrit repository for validating admission webhook in Toolforge Kubernetes, and my team strongly wishes to being moving out of the /labs namespace and into something that is recognizable for this sort of thing (/cloud or /toolforge).

We figure that copying the whole tree all at once would be quite destructive (because of all the contributors involved), but we would like to try to put new things in the right place.
I need help to create the top level "folder" of perhaps /cloud and then maybe /cloud/toolforge under that to container all things "labs" and then the world of "toollabs" in the future.

I tried requesting a repo like that and discovered I need to do more to get the top level sorted out first.

Event Timeline

Although, this may be the wrong way if there is a way to smoothly move/rename projects in the future. In that case, I'd want to rename it with the rest instead. :)

Mentioned in SAL (#wikimedia-releng) [2019-10-11T15:59:36Z] <paladox> ssh -p 29418 gerrit.wikimedia.org gerrit create-project cloud.git --permissions-only --description="Container for all other cloud/* projects for permissions, etc." - T235279

Mentioned in SAL (#wikimedia-releng) [2019-10-11T16:03:08Z] <paladox> ssh -p 29418 gerrit.wikimedia.org gerrit create-project cloud.git --permissions-only - T235279

This is closely tied to T229936 in goals and direction, but I need to get some code up there fairly soon, so I personally prioritize this part. It just needs to be done with the idea in mind that we want to retire /labs entirely over time (and all "labs" names for WMCS things and toolforge things). There are Toolforge contributor repos under /labs/tools and other places, which is why it is managed the way it is, so people can request repos there through the usual channels.

What Paladox did :]

As for renaming / moving repositories, that is not possible in Gerrit out of the box. One could mirror a repo, push it to a new name and delete the old one, but that means all changes and reviews get lost as I understand it. OR maybe nowadays they are in git and no more in the database at all, but I would not bet on that.

We might be able to figure out the steps needed to rename repositories properly though.

What Paladox did :]

+1

Looks like this has created the "gerrit.wikimedia.org/r/cloud" namespace as a permissions namespace. When you go to create a new project, specifying the "cloud" project as the parent project should inherit all permissions needed. e.g., a cloud/toolforge project could inherit from cloud so that the right folks were automatically made the owner of all refs/*.

The cloud namespace seems to have the same permissions setup as labs; however, that's fairly minimal at this point: labs project.config =~ cloud project.config. The labs/toollabs project seems to have more intense acl rules.

As for renaming / moving repositories, that is not possible in Gerrit out of the box. One could mirror a repo, push it to a new name and delete the old one, but that means all changes and reviews get lost as I understand it. OR maybe nowadays they are in git and no more in the database at all, but I would not bet on that.

We might be able to figure out the steps needed to rename repositories properly though.

This is a fraught process still. There is an upstream plugin, but it is out-of-date currently. Whether or not that plugin will be moved into the current notedb database setup is unclear to me.

There may be alternatives here; I wonder if we'd be able to mark the old repo as archived and just create a new repo with the existing history. This is something to test if it would be an acceptable plan. I do have a sinking suspicion this might make Gerrit angry, though.

So! Now we have cloud/toolforge in place, and I'm following the usual procedure to make my new repo for T234231. Thanks everybody!

Bstorm claimed this task.