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

fix: Limit segment rules and conditions #3397

Merged
merged 17 commits into from
Feb 14, 2024

Conversation

zachaysan
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Introduce a limit via settings constant to limit the number of conditions a segment can undergo before rejection.

How did you test this code?

Two long unit tests one for the update the other for the create. Existing tests can handle the cases where we want to see segments created in response to API input.

Copy link

vercel bot commented Feb 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2024 1:45pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2024 1:45pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2024 1:45pm

Copy link
Contributor

github-actions bot commented Feb 7, 2024

Uffizzi Preview deployment-46121 was deleted.

@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c666d29) 95.91% compared to head (bdcb02b) 95.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3397      +/-   ##
==========================================
+ Coverage   95.91%   95.93%   +0.01%     
==========================================
  Files        1085     1087       +2     
  Lines       33677    33805     +128     
==========================================
+ Hits        32302    32430     +128     
  Misses       1375     1375              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple of comments to the code. I think we should also document this in the system limits section of the docs.

Have we confirmed yet how the FE behaves in this case too?

api/segments/serializers.py Outdated Show resolved Hide resolved
@zachaysan
Copy link
Contributor Author

Have we confirmed yet how the FE behaves in this case too?

The mishandled errors have been fixed in this PR: #3413

@zachaysan
Copy link
Contributor Author

I think we should also document this in the system limits section of the docs.

Ok no problem. Added this locally.

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 docs Documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants