Skip to content

feat(versioning): remove Stale tag when a new feature version is published - #8964

Open
TejasLamba2006 wants to merge 1 commit into
Flagsmith:mainfrom
TejasLamba2006:fix/remove-stale-tag-on-flag-modification
Open

TejasLamba2006 wants to merge 1 commit into
Flagsmith:mainfrom
TejasLamba2006:fix/remove-stale-tag-on-flag-modification

Conversation

@TejasLamba2006

@TejasLamba2006 TejasLamba2006 commented Nov 14, 2026 •

Copy link
Copy Markdown

Contributes to #8705.

Changes

  • Connect a remove_stale_tag receiver to environment_feature_version_published in api/features/versioning/receivers.py so publishing a new EnvironmentFeatureVersion (direct saves, scheduled changes, and change requests) removes any TagType.STALE tag from the feature while keeping user tags and other system tags (UNHEALTHY, etc.) intact.
  • Add unit coverage in api/tests/unit/features/versioning/test_unit_versioning_receivers.py.

(Note: the background staleness tagging task itself lives outside the OSS repository, so this PR covers the tag-removal side on feature modification.)

View guided diff

…is published

Disconnect any TagType.STALE tag from the feature when
environment_feature_version_published fires, leaving user tags and other
system tags untouched.
@TejasLamba2006
TejasLamba2006 requested a review from a team as a code owner November 14, 2026 13:48
@TejasLamba2006
TejasLamba2006 requested review from emyller and removed request for a team November 14, 2026 13:48
@vercel

vercel Bot commented Nov 14, 2026

Copy link
Copy Markdown

@TejasLamba2006 is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the api Issue related to the REST API label Nov 14, 2026
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

When an environment feature version is published, a new receiver removes tags of type TagType.STALE from its associated feature. A unit test checks that stale tags are removed and unhealthy and regular tags remain.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to e5de8

Publishing a new feature version now removes the Stale tag from the feature while leaving other tags in place. No merge-blocking risk was identified.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: fd90f8e3-0953-47b6-a4e2-6f9b6d701cbc
Commits

Reviewing files that changed from the base of the PR and between 910356d and e5de8ae.

Files selected for processing: 2

  • api/features/versioning/receivers.py
  • api/tests/unit/features/versioning/test_unit_versioning_receivers.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval skipped because this PR is from an external contributor.

View guided diff | Re-trigger cubic

This branch has not been deployed

No deployments
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.

1 participant