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 fields necessary for stale flags #3263

Merged
merged 15 commits into from
Feb 14, 2024
Merged

Conversation

matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Jan 10, 2024

Changes

Adds logic necessary to support the stale flags functionality. The relevant changes are:

  1. Adds fields to the list features endpoint which the FE can use to display / sort data about when a flag was last modified
  2. Updates the Tag model to support 3 new fields:
    a. is_system_tag - field denoting that the tag is system created, rather than user created (necessary for the tag we plan to add to any flags determined to be stale)
    b. is_permanent - a replacement for the current FE functionality which uses regex to determine if a tag indicates that a feature is 'permanent' and should not be deleted. This is necessary as we will ignore any features tagged with a tag that has this attribute when evaluating if a feature is stale or not.
    c. type - a field to add a new enumerated 'type' field to a tag. This allows us to deterministically find the tag which indicates a feature is stale.

Note that there is a related PR in the workflows repository here which adds the relevant tasks, etc. to supplement these changes.

How did you test this code?

Added unit tests.

Copy link

vercel bot commented Jan 10, 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 12, 2024 2:22pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 2:22pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 2:22pm

@github-actions github-actions bot added the api Issue related to the REST API label Jan 10, 2024
Copy link
Contributor

github-actions bot commented Jan 10, 2024

Uffizzi Preview deployment-44081 was deleted.

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (6500451) 95.95% compared to head (3e4a658) 76.68%.
Report is 45 commits behind head on main.

Files Patch % Lines
...tions/0005_add_tag_fields_for_stale_flags_logic.py 83.33% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3263       +/-   ##
===========================================
- Coverage   95.95%   76.68%   -19.27%     
===========================================
  Files        1067     1043       -24     
  Lines       32649    32135      -514     
===========================================
- Hits        31327    24644     -6683     
- Misses       1322     7491     +6169     

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

@matthewelwell matthewelwell requested review from khvn26 and removed request for a team January 19, 2024 10:51
@matthewelwell matthewelwell changed the title feat: (WIP) stale flags feat: add fields necessary for stale flags Jan 19, 2024
@khvn26
Copy link
Member

khvn26 commented Feb 7, 2024

The code looks fine, but I felt I needed some questions cleared up for me before approving it.

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.

3 participants