Skip to content

BB-6295 Change limit for Grove, OpenEdX instances values

Created by: ngdangdat

Support URLs

JIRA task: https://tasks.opencraft.com/browse/BB-6295

Why

  • configuration_version field is sometimes too short for storing branch names, we want to increase that
  • Grove's instance name length is limited by DigitalOcean, we also want it to limit from where people create and update Grove instance

What

  • Change configuration_version character limit to 256.
    • Checked branch names of open-craft/configuration repository. The longest branch name has 66 characters.
    • The purpose of this field is similar to edx_platform_commit which is used to refer to a commit hash or branch name or tag name. Quote from the help text of edx_platform_commit field:

edx-platform commit hash or branch or tag to use. Leave blank to use the default, which is equal to the value of "openedx_release".

Chores

  • Add missing default configuration keys to .env.test file to allow running in local

Supporting information

Top 10 of lengths of branches in configuration repository

git remote get-url origin                       
git@github.com:open-craft/configuration.git

git branch -a | grep origin | cut -d'/' -f3- | awk '{ print length($0); }' | sort -n -r | uniq -c | head
      1 66
      2 62
      1 56
      1 55
      1 54
      1 53
      1 52
      2 51
      3 50
      4 49

Testing instruction

Grove instance

Expected:

  • Change on limit of configuration_version is applied
  • Change on limit of instance name is applied

Steps

  1. Go to admin UI page and login
  2. Create a new Grove instance with 0x29a/bb6112/prepare-maple-configuration-shared-branch as value of configuration version field -> Expect the instance to be created successfully
  3. Edit newly created instance
  4. Input a name that has more than 49 characters to Instance name field
  5. Save -> Expect a validation message raised on exceeding length limit

OpenEdx instance (instances with type other than Grove)

Expected

  • Change on limit of configuration_version is applied
  • Change on limit of instance name is not applied

Steps 1 -> 4 same as Grove instance section 5. Save -> Expect no validation message arise and the instance is saved successfully

PoW

Merge request reports