Skip to content

Support storage_size_limit in PlanLimits API

Vijay Hawoldar requested to merge vij-plan-limits-storage-size into master

What does this MR do and why?

Adds storage_size_limit to the PlanLimit API entity and allows updating it's value via the Internal REST API.

This is to enable us to adjust .com values of the storage_size_limit per plan as part of https://gitlab.com/gitlab-org/gitlab/-/issues/340887

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. Perform a GET request to see the storage_size_limit for a plan:
    curl --request GET \
      --url http://gdk.test:3000/api/v4/application/plan_limits?plan_name=ultimate \
      --header 'PRIVATE-TOKEN: your_admin_token_here' \
      --header 'content-type: application/json' \
  2. Perform a PUT request to update the storage_size_limit for a plan:
    curl --request PUT \
      --url http://gdk.test:3000/api/v4/application/plan_limits \
      --header 'PRIVATE-TOKEN: your_admin_token_here' \
      --header 'content-type: application/json' \
      --data '{
     "plan_name": "ultimate",
     "storage_size_limit": 123456
      }'

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports