Skip to content

Proof of concept: Introduce validate_limits method

Mohamed Hamda requested to merge mhamda/add-limit-validation into master

What does this MR do and why?

This MR addresses: https://gitlab.com/gitlab-org/gitlab/-/issues/416114

This MR enhances the PlanLimits model by adding validations to attributes notification_limit, enforcement_limit, and storage_size_limit attributes.

Changes made in this MR:

  • Added custom validations to ensure that notification_limit is greater than or equal to storage_size_limit.
  • Added custom validations to ensure that enforcement_limit is greater than or equal to storage_size_limit.
  • Added custom validations to ensure that enforcement_limit is greater than or equal to notification_limit.
  • Updated the test cases to cover the new validations for all three attributes.

MR acceptance checklist

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

Merge request reports