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

Create SystemLimit data model #35675

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

gherceg
Copy link
Contributor

@gherceg gherceg commented Jan 23, 2025

Product Description

Technical Summary

Simple SQL table to hold onto limits for features. It is easier to update these via django admin than putting them in settings and having to run cchq commands, so that is the main inspiration for this change. This just introduces the model.

Feature Flag

Safety Assurance

Safety story

Very safe. Just adding a new table.

Automated test coverage

QA Plan

No

Migrations

  • The migrations in this code can be safely applied first independently of the code

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@gherceg gherceg requested a review from AmitPhulera January 23, 2025 21:24
@dimagimon dimagimon added the reindex/migration Reindex or migration will be required during or before deploy label Jan 23, 2025
@gherceg gherceg requested a review from dannyroberts January 23, 2025 21:24
@gherceg gherceg marked this pull request as ready for review January 23, 2025 21:24
@gherceg gherceg force-pushed the gh/project-limits/data-model branch from 1dcd3e5 to 31d5c99 Compare January 23, 2025 21:29
@gherceg gherceg force-pushed the gh/project-limits/data-model branch from 0f55c33 to 0e9386f Compare January 23, 2025 21:49
@gherceg
Copy link
Contributor Author

gherceg commented Jan 24, 2025

Cal happened to give me drive by thoughts on this, and mentioned that moving feature limits from settings to a model makes it harder to track changes (very fair point). The django admin does track who made changes and when, but that does not include actual values of the limit. We could add the field audit decorator to this model if we are interested in tracking changes over time, which I'm tempted to do.

@orangejenny
Copy link
Contributor

We could add the field audit decorator to this model if we are interested in tracking changes over time, which I'm tempted to do.

That sounds like a good idea.

@orangejenny orangejenny requested a review from nospame January 27, 2025 21:33
last_modified is not needed since it can be determined via audit events
This field is really only intended for extreme circumstances when we
want to either increase or decrease a specific domain's limit
@gherceg gherceg changed the title FeatureLimit data model Create SystemLimit data model Jan 30, 2025
@gherceg
Copy link
Contributor Author

gherceg commented Jan 30, 2025

Sorry for all of the new commits. This is ready for review now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reindex/migration Reindex or migration will be required during or before deploy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants