Calculate plan limits based on active destinations
What does this MR do and why?
Calculate plan limits based on active destinations rather than just total
This will allow users to setup a maximum of active destinations, and mark other ones as inactive.
You cannot:
- Create a destination if there are already <plan limits #> destinations
- Update a destination to be active if it would exceed the <plan limits #>
Queries:
Plan.default.actual_limits: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/42466/commands/130001
Grab a destination: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/42466/commands/130003
Active count: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/42466/commands/130004
Active for Group count: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/42466/commands/130006
References
Screenshots or screen recordings
How to set up and validate locally
- Create 5 active audit event streaming destinations
- Try to create a 6th one -> should fail
- Mark one as inactive
- Try to create a 6th destination -> should succeed
- Try to mark the inactive destination -> should fail
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
