unison icon indicating copy to clipboard operation
unison copied to clipboard

The codebase server `/list` API doesn't return a `namespaceName` when queried with a hash

Open hojberg opened this issue 4 years ago • 5 comments

Querying a namespace with the list API and a hash doesn't return a name (the value is a null):

GET http://127.0.0.1:8080/asdf/api/list?namespace=%232bbp1bkbef8t4b75sblro3m8kd7sjsgrvcont5sg85su77eich2ncgnoprmn7b8ipto6l5mtjs8t7qrh9pc1ohe7tmfg5r5a4r5ll88 (%23 is the URL encoded version of #)

returns

{
  "namespaceListingName": null, // this should be "ANSI" or ".ANSI" (?)
  "namespaceListingHash": "#2bbp1bkbef8t4b75sblro3m8kd7sjsgrvcont5sg85su77eich2ncgnoprmn7b8ipto6l5mtjs8t7qrh9pc1ohe7tmfg5r5a4r5ll88",
  "namespaceListingChildren": [ /* ... abbreviated ...  */ ]
}

The name should be ANSI.

This is blocking https://github.com/unisonweb/codebase-ui/issues/78

hojberg avatar Jul 13 '21 15:07 hojberg

The RICE score is based on the /list API being used over https://github.com/unisonweb/unison/issues/2172 in the initial version of https://github.com/unisonweb/codebase-ui/issues/78

hojberg avatar Jul 13 '21 15:07 hojberg

Rúnar mentions that since oldnames are not working, namespaceListingName can be null, but shouldn't be a problem for the latest version of a namespace.

hojberg avatar Jul 13 '21 16:07 hojberg

Old names effort: https://github.com/unisonweb/unison/issues/2128

hojberg avatar Jul 13 '21 16:07 hojberg

This needs a discussion with @hojberg, @runarorama and @pchiusano to figure out how important it is and next steps, given that it seems like it will require a new repo format (or maybe just some aux tables in the current schema).

pchiusano avatar Jul 26 '21 17:07 pchiusano

Removing the p1 label. We still eventually want to support this, but got around it for the UI by including the codebase hash + namespace name in urls instead.

hojberg avatar Aug 09 '21 15:08 hojberg