Page MenuHomePhabricator

Make repository URIs slightly prettier
Closed, ResolvedPublic

Tokens
"Like" token, awarded by 20after4."Love" token, awarded by clloos."Mountain of Wealth" token, awarded by nemobis."Like" token, awarded by avivey."Like" token, awarded by techdragon."Like" token, awarded by witrin."Like" token, awarded by vinzent."The World Burns" token, awarded by joshuaspence."Like" token, awarded by allanb.
Assigned To
Authored By
wills
Dec 16 2013, 10:43 PM

Description

Once, repositories needed to have callsigns. They no longer do; callsigns are now optional.

Currently, repositories with no callsign get ID-based URIs like /diffusion/123/. This doesn't cause any concrete issues, but it would be nice to offer more human-readable URIs based on the "Short Name" instead, which would look like /source/repository-short-name/.

Revisions and Commits

rARC Arcanist
D15472
rP Phabricator
Abandoned
D17637
D16851
D15344
D15305
D15304
D15303
D15302
D15301
D15300
D15296
D15295
D15294
D15293
D15049
D15049
D14990
D14989
D14988
D14949
D14948
D14947
D14945
D14944
D14942
D14941
D14940
D14937
D14933
D14932
D14931
D14930
D14929
D14928
D14927
D14926
D14924
D14923
AuditedD11050

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
elesh added a subscriber: elesh.Jan 29 2016, 7:13 AM
epriestley moved this task from vNext to v3 on the Diffusion board.Feb 16 2016, 9:50 PM
epriestley edited projects, added Diffusion (v3); removed Diffusion.

For repositories with a short name like "codebase", I imagine users would prefer /diffusion/codebase/ over /diffusion/123/ as the canonical URI.

However, we can't easily do this because it conflicts with other existing URIs like /diffusion/new/, /diffusion/inline/, /diffusion/lint/, /diffusion/query/, etc.

I can either move all of the non-repository Diffusion services to some new URI or put canonical repository short names under a different base URI. I'm inclined to do the latter, and use /source/ as the base, so a repository with short name "codebase" would have canonical URI /source/codebase/. If you strongly object to this, you have, like, a couple of hours to complain, unless this turns out to be trickier than I think.

D15302 was the change I was most worried about here, and it seems to have been entirely straightforward. I now expect to move forward like this:

  • Make callsigns optional.
  • Do a large amount of adjacent work untangling all the "we want our repository to have 30 different URIs, some of which only work on Tuesdays" use cases (T10366, T7516, T5406, T4705). This may be several days of work.
  • Add the new "Short Name"-based display URIs (/source/codebase/ instead of /diffusion/123/).
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Feb 18 2016, 6:29 PM
r0bbie added a subscriber: r0bbie.Mar 15 2016, 1:31 PM
holmboe added a subscriber: holmboe.Apr 5 2016, 9:37 AM
RonnieR added a subscriber: RonnieR.Apr 6 2016, 2:30 AM
fcoelho added a subscriber: fcoelho.Apr 6 2016, 8:24 PM
epriestley renamed this task from Make repository callsigns optional or more flexible to Make repository URIs slightly prettier.May 12 2016, 1:06 AM
epriestley updated the task description. (Show Details)

Callsigns have been optional for some time (roughly since D15305 in February 2016, although there were a trickle of bugs after that).

URIs as a whole have been generalized and made more flexible in connection with T10366. The documentation on callsigns has been updated in connection with T10748.

Remaining work here is to make /source/repository-short-name/ ("Short Name URIs") work to access a repository, as an addition to /diffusion/123/ ("ID URIs") and /diffusion/XYZ/ ("Callsign URIs"). Most of the groundwork for this is in place, but the benefit is a minor cosmetic one.

Today, short names can be used to identify repositories in a number of other contexts, like bin/repository workflows.

eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.May 13 2016, 6:03 PM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jul 4 2016, 9:06 PM
scode added a subscriber: scode.Aug 4 2016, 11:32 PM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Aug 5 2016, 4:40 PM

Shortname is already used for the shortname.git portion of the URI. Would it be out of the question to allow a separate path to be configured, perhaps also including nested directories?

The use case is mirroring something like an Android distribution, where the original source has repositories organised into a logical hierarchy, and is often using repo to fetch the full collection of repositories at once.

Currently to put repositories under Phabricator, I need to go through and edit the path of each individual repostory in the repo manifest, but if the path could be more flexible on the Phabricator side, I could just edit the default remote, and keep the relative paths below that the same.

How would we distinguish between source/android/browse/carafe/ being "browse branch carafe of repository android" vs "browse the home page of repository carafe located at path android/browse/" in such a scheme?

How difficult would this be for someone to implement / does upstream have an implementation timeline for this?

HuMMeL621 moved this task from Backlog to Preflight on the Prioritized board.Sep 8 2016, 8:08 AM
HuMMeL621 moved this task from Preflight to Backlog on the Prioritized board.
epriestley moved this task from Backlog to The Queue on the Prioritized board.Nov 13 2016, 8:29 PM

It's entirely possible I missed some things in supporting the 25,000 different URI forms we now support, but just file a new issue if you run into anything since this task is now 200 years old with seventy pages of unrelated disucssion.

urzds added a subscriber: urzds.Jul 12 2017, 11:15 AM