Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display feature, segment and segment override limits and prevent creation if exceeded #2498

Closed
6 tasks
matthewelwell opened this issue Jul 21, 2023 · 0 comments
Closed
6 tasks
Assignees
Labels
api Issue related to the REST API front-end Issue related to the React Front End Dashboard

Comments

@matthewelwell
Copy link
Contributor

matthewelwell commented Jul 21, 2023

We have added limits to the API to prevent the creation of features, segments and segment overrides above a certain limit for each project.

We should:

  • Return those limits in the API response for projects, along with the current numbers of features, segments
  • Return the total number of segment overrides on the response to get an environment
  • Add the limits to the UI (perhaps as a warning banner when they are within 10% of their limit?)
  • Prevent users from creating new entities when the limit is reached

As far as I can tell, this will involve adding the following fields to the API responses on the retrieve endpoints for project and environment:

# Project

max_segments_allowed
max_features_allowed
max_segment_overrides_allowed
total_segments
total_features

# Environment

total_segment_overrides

These can only be added to the retrieve endpoints, not the list endpoint, which will require a change to the FE that seemingly retrieves all the data from the list endpoints.

The warning banner should read:

"Your project|environment using X% of the total allowance of features|segments|segment overrides. Please contact support to discuss increasing this limit."

The limits are documented here.

The PR to add the limits is here.

Acceptance Criteria

  • If number of features exceeds 90% of the limit, a warning banner is shown in the UI
  • If number of features reaches limit, no features can be created through the dashboard
  • If number of segments exceeds 90% of the limit, a warning banner is shown in the UI
  • If number of segments reaches limit, no segments can be created through the dashboard
  • If number of segment overrides exceeds 90% of the limit, a warning banner is shown in the UI
  • If number of segment overrides reaches limit, no segments can be created through the dashboard
@matthewelwell matthewelwell added front-end Issue related to the React Front End Dashboard api Issue related to the REST API labels Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

No branches or pull requests

3 participants