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: add migration file to generate stale flags tag for all existing projects #3755

wants to merge 1 commit into
base: main
Choose a base branch


Copy link

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


Currently the stale flags task is failing because it is trying to create stale flags in projects that don't have the tag created in.

This PR adds a migration to add the default tag to all existing projects, note that all new projects already have the tag automatically created.

I also considered the option of having the task create the stale flags tag lazily, but we decided that we want to be able to show our customers that they can get the benefit of stale flags functionality if they upgrade their plan. They are also free to use the tag manually themselves if they want.

How did you test this code?

Ran the migration manually locally to confirm that the tag was created for projects that didn't already have the tag and was not created for those projects that do have it.

@matthewelwell matthewelwell requested review from a team and novakzaballa and removed request for a team April 11, 2024 14:00
Copy link

vercel bot commented Apr 11, 2024

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

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Apr 11, 2024 2:00pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview Apr 11, 2024 2:00pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview Apr 11, 2024 2:00pm

@github-actions github-actions bot added the api Issue related to the REST API label Apr 11, 2024
Copy link

github-actions bot commented Apr 11, 2024

Uffizzi Ephemeral Environment deployment-49975


📄 View Application Logs etc.

What is Uffizzi? Learn more!

Copy link

Codecov Report

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

Project coverage is 95.89%. Comparing base (c950875) to head (1e00ac4).
Report is 3 commits behind head on main.

Files Patch % Lines
...ns/ 58.82% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3755      +/-   ##
- Coverage   95.90%   95.89%   -0.02%     
  Files        1102     1103       +1     
  Lines       34703    34723      +20     
+ Hits        33283    33296      +13     
- Misses       1420     1427       +7     

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

Copy link
Contributor Author

I'd like to discuss this with @kyle-ssg because this will add the Stale tag to all existing projects in the Flagsmith platform, but I'm not sure that the experience is quite right since it seems to suggest that the Stale flag behaviour will work for all subscription plans, but that's not the case - it will only work for Enterprise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api Issue related to the REST API
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants