4730: Reviewboard repository names are limited to 64 characters

mgokhale-arbor

What version are you running?

3.0.6

What's the URL of the page containing the problem?

<internal>

What steps will reproduce the problem?

We use Gitlab internally, with Reviewboard for code review. We create new Reviewboard repositories via a webhook in Gitlab every time a new repository is created.

We set the name of the repository to be the namespace of the repo in Gitlab. So, for example, if the project is at git.example.com/group/project, the name in Reviewboard will be group/project.

Since Gitlab has nested subgroups, sometimes the namespacing can be quite long, like group/somewhat-long-subgroup-name/really-long-project-name. Note that Gitlab can have more nesting of subgroups.

A few weeks ago, one of our hooks failed with a DataError: value too long for type character varying(64) -- basically it was failing to create a repo with a really full name, that more than 64 characters.

This seems to me to be a direct consequence of the name being limited to 64 characters in https://github.com/reviewboard/reviewboard/blob/release-3.0.6/reviewboard/scmtools/models.py#L91 (our release is 3.0.6, but it's the same in master).

I think this 64-character limit is a bug since the name can be quite long if you include all the namespacing inherent in systems with nested groups like Gitlab. Would the Reviewboard devs consider bumping this to 255 characters? I suspect we're probably not the only ones hitting this.

chipx86
#1 chipx86

I wouldn't say that the limit is a bug, but I can see where your naming scheme runs into problems. I think a limit of 255 produces other problems, namely the display of names in the New Review Request page and elsewhere.

Usually, repositories in Review Board are named after the actual name of the repository on whatever service is being used, with a namespace being used to disambiguate (so for instance, Review Board and RBTools would be repository names, but CI Infrastructure and Web Server Infrastructure might be used instead of ci-team/infrastructure and web-team/infrastructure. It's easier to read/consume by users, avoids a lot of wrapping issues that longer names provide, and survives the moving of repositories to other groups down the road after reorgs.

I'm not against bumping up the limit, but I wouldn't want to do it in a point release, since that impacts many customers of ours who have to be careful about when they perform upgrades that impact database schema.

PraiseA
#2 PraiseA

I'll work on this!

david
#3 david

Fixed in release-3.0.x (c1a2766). This will ship in 3.0.11. Thanks!

  • -New
    +Fixed