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

feat: Add state feature filter #3541

Merged
merged 13 commits into from
Mar 15, 2024
Merged

Conversation

zachaysan
Copy link
Contributor

@zachaysan zachaysan commented Mar 4, 2024

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

Fixes #3243

Introduce the ability to filter based off of the feature's value or enabled status, but only when connected to a given environment. Note that there is a limitation at present when filtering off of features with an integer value since I was not able to find a workable icontains that is handled by that workflow in Django.

How did you test this code?

Manually tested a lot of combinations, kept two of them for the actual tests since they are lengthy tests.

Copy link

vercel bot commented Mar 4, 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 Mar 14, 2024 6:39pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2024 6:39pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2024 6:39pm

@zachaysan zachaysan changed the title featadd state feature filter feat: Add state feature filter Mar 4, 2024
@github-actions github-actions bot added the api Issue related to the REST API label Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

Uffizzi Preview deployment-48414 was deleted.

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 99.09091% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 95.86%. Comparing base (8d79cb1) to head (e83b6f6).
Report is 6 commits behind head on main.

Files Patch % Lines
api/features/views.py 96.29% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #3541    +/-   ##
========================================
  Coverage   95.86%   95.86%            
========================================
  Files        1099     1099            
  Lines       34282    34455   +173     
========================================
+ Hits        32864    33032   +168     
- Misses       1418     1423     +5     

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

api/features/serializers.py Outdated Show resolved Hide resolved
api/features/views.py Outdated Show resolved Hide resolved
api/features/views.py Outdated Show resolved Hide resolved
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.

On the whole this looks 👌 but I've added a few minor comments where I think some improvements can be made.

I think there's only one actual necessary change which is related to setting the type in the query filter as well.

api/features/views.py Outdated Show resolved Hide resolved
api/features/views.py Show resolved Hide resolved
api/tests/unit/features/test_unit_features_views.py Outdated Show resolved Hide resolved
api/features/serializers.py Outdated Show resolved Hide resolved
api/features/views.py Outdated Show resolved Hide resolved
@matthewelwell matthewelwell added this pull request to the merge queue Mar 15, 2024
Merged via the queue into main with commit 2ffe8e9 Mar 15, 2024
23 checks passed
@matthewelwell matthewelwell deleted the feat/add_state_feature_filter branch March 15, 2024 12:20
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter flags in dashboard based on flag state
3 participants