Opened 7 years ago

Closed 11 months ago

#6111 closed task (fixed)

Make git.../user/username/reponame.git work for all user repositories

Reported by: nickm Owned by: tor-gitadm
Priority: Medium Milestone:
Component: Internal Services/Service - git Version:
Severity: Normal Keywords: git
Cc: chiiph, chrisd, erinn, hoganrobert, mikeperry, n8fr8, nickm, nima, pde, rransom, runa, schoen, sebastian, sjm217, tomb Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

On our git servers, older user repositories are stored with URLs like

git://git.torproject.org/USERNAME/PROJECT.git

and newer repositories have names like

git://git.torproject.org/user/USERNAME/PROJECT.git

It would be great if the second format was the canonical format, so that we wouldn't need to guess when a repository was added or visit gitweb.torproject.org in order to find the repository's URL.

We would want to make this change in a way that doesn't break everything that's already pulling or pushing to the old URLs: inconveniencing everybody like that would probably not be a win.

Child Tickets

Change History (14)

comment:1 Changed 7 years ago by Sebastian

Owner: changed from sebastian to Sebastian
Priority: normalmajor
Status: newassigned

Yes, this has been on my todo since forever. Thanks for reminding me!

comment:2 Changed 6 years ago by weasel

Component: Tor Sysadmin TeamService - git
Priority: majornormal

comment:3 Changed 22 months ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

comment:4 Changed 13 months ago by irl

Owner: changed from Sebastian to tor-gitadm

Setting owner to tor-gitadm as the owners that are set are not working on this currently. (Please correct me if I'm wrong).

comment:5 Changed 13 months ago by irl

Cc: arma atagar boklm chiiph chrisd erinn hoganrobert kaner karsten linus mikeperry n8fr8 nickm nima pde rransom runa schoen sebastian sjm217 tomb added

(If you have been added to CC on this ticket, it is because you have repositories that would be affected by this change! If you no longer use these repositories, please let us know and we can move them to the attic.)

There are a few options for tackling this ticket.

This blog post has some ideas about what we want to do. In gitolite3 there is an additional file in the .git folder of every repository that would need to be updated.

URLs to change

There are three places (actually more than this if you count onion addresses) where URLs exist:

Developer git URLs

ssh://git@git-rw.torproject.org/...

These exist on cupani in /srv/git.torproject.org/repositories. They are served by gitolite on this host via SSH. There is a hook in /srv/git.torproject.org/git-helpers/ named 00-sync-to-mirror that will copy repositories to vineale. If repositories are removed from cupani, they will still remain on vineale and would need to be manually cleaned up.

Anonymous git URLs

https://git.torproject.org/...

These are served by Apache in vineale. Configuration for Apache is in puppet. The repositories themselves would be sorted when the above are sorted, but after manual cleanup there would be no redirect and this would have to go in the Apache config.

Anonymous gitweb URLs

https://gitweb.torproject.org/...

This is the same as above really.

Option 1: Just break stuff

This is the easiest of all the options. It would mean all old URLs for these repositories break including git-rw, git and gitweb.

  1. Move the repositories on cupani into the user/ directory
  2. Update the gitolite config
  3. Clean up the old repositories at their old locations on vineale

Option 2: Keep developer URLs working

As option 1, but additionally:

  1. Edit /srv/git.torproject.org/etc/gitolite.rc and enable 'Alias::input'
  2. Add a new REPO_ALIASES variable to the file with mapping of repositories

(Note: this would also require that we upgrade gitolite on this host as the version it is running is too old to support this feature!)

Option 3: Keep anonymous URLs working

As option 1, but additionally:

  1. Add HTTP redirects to the Apache configs for vineale to redirect the old URLs to new ones

comment:6 Changed 11 months ago by arma

Looks like I have tor, torspec, and vidalia "arma" repos.

I am fine with whatever option(s) we pick from the above.

comment:7 Changed 11 months ago by irl

Cc: arma karsten removed

comment:8 Changed 11 months ago by ln5

I have tor and tor-extra "linus" repos.

For the tor repo, I'm fine with whatever option listed in this ticket. Just let me know when it happens.

The tor-extra repo can be moved to the attic, as per #28028.

Thanks!

comment:9 Changed 11 months ago by irl

linus: Your repositories have now been moved. You'll have to update your remotes if you want to push/pull but everything else should be as before.

comment:10 Changed 11 months ago by irl

Cc: linus removed

comment:11 Changed 11 months ago by irl

7 weeks have now passed since I set out the options here, so it seems reasonable to assume that for those that did not yet express an opinion, they probably aren't going to if we wait another 7 weeks.

I will be going through and implementing option 1 as time allows.

comment:12 Changed 11 months ago by boklm

Option 1 is fine for me.

comment:13 Changed 11 months ago by irl

Cc: atagar boklm kaner removed

atagar boklm and kaner have had their repos moved.

comment:14 Changed 11 months ago by irl

Resolution: fixed
Status: assignedclosed

Everyone's repos have now been moved.

Note: See TracTickets for help on using tickets.