Allow repository names to be 255 characters long

Review Request #10153 — Created Sept. 21, 2018 and submitted

praiseA
Review Board
release-3.0.x
4730
ad41851...
reviewboard, students

When creating a repository, the name field previously allowed the name to
be 65 characters long. Once the name got to 65 characters, you would not
be able to type any additional characters.

Now, you are allowed to specify a name that is less than or equal to 255
characters long.

  • Ran ./reviewboard/manage.py evolve --execute evolve to update
    the database
  • Restarted my server
  • Manually Tested by
    • Clicked on the add button for Repositories
    • Specified a name that was 255 characters long
    • Clicked save
    • Got no Errors
    • Verified that the name shown in my list of repositories was
      255 characters long
  • Added a unit test to verify creating a repository name with 255
    characters works, and does not produce errors
  • 0
  • 0
  • 14
  • 0
  • 14
Description From Last Updated
david
  1. 
      
  2. We'll need the summary/description/testing done to be more fleshed out, and follow our formatting guidelines: https://www.notion.so/reviewboard/Writing-Good-Change-Descriptions-10529e7c207743fa8ca90153d4b21fea

    These fields get turned into the commit message, and the goal is to have people be able to understand a change from them.

  3. Because this is a new evolution, it should go at the end of the sequence list rather than in the middle.

  4. 
      
praiseA
praiseA
praiseA
david
  1. Two tiny issues left relating to the review request info:

  2. Can you put the bug number into the "Bugs" field?

    1. I put that yesterday. Does it not show for you?

  3. Please wrap your description to 72 columns.

  4. 
      
praiseA
praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
brennie
  1. 
      
  2. Can you rewrite your summary to be in the imperitive mood, i.e., as if it were a command or an order.

    If you substitute your summary into the following sentence it should make sense:

    "This patch will <summary>"

    (e.g., start the summary at "Allow")

  3. The command in your testing done (... evolve --execute) doesnt need to have different code blocks on each line.
    e.g.

    The code block can `begin on one line
    and end on the next.`
    
  4. reviewboard/scmtools/tests/test_repository.py (Diff revision 6)
     
     
     
     
     
     
     
     
     

    Python strings have this cool feature that you can split them over multiple lines like so:

    my_str = (
        'this is my really cool '
        'multi-line '
        'and very long '
        'string.'
    )
    

    So we can format this as:

    self.repository = Repository.objects.create(
        name='abcd'
             'def'
             'ghi' # ...
    )```
    
    
    *However*, we can also generate a very long string by doing:
    
    ```python
    self.repository = Repository.objects.create(
        name='a' * 255,
        # ...
        )
    

    which is shorter and more concise (and we know the string in question is 255 characters long without calculating it to verify the test).

  5. 
      
praiseA
brennie
  1. Ship It!
  2. 
      
chipx86
  1. Looks great!

  2. Can you change this to Testing Repository.name with 255 characters? Having the specific thing being tested first is helpful for matching up tests with what's being tested.

    The function can also just be test_repository_name_with_255_characters.

  3. 
      
praiseA
mike_conley
  1. This looks great! Thanks!

  2. 
      
david
  1. Ship It!
  2. 
      
praiseA
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (c1a2766)
Loading...