-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(flags): add GET feature_flags/:id/status for determining flag staleness #26340
Conversation
…ct-stale-flags
…ct-stale-flags
…ct-stale-flags
…ct-stale-flags
…ct-stale-flags
…ct-stale-flags
…ct-stale-flags
…ct-stale-flags
… into detect-stale-flags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few copy suggestions and one question about the query.
Co-authored-by: Dylan Martin <[email protected]>
Co-authored-by: Dylan Martin <[email protected]>
…ct-stale-flags
…ct-stale-flags
…ct-stale-flags
…ct-stale-flags
…ct-stale-flags
… into detect-stale-flags
…ct-stale-flags
… into detect-stale-flags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API design looks fine and idiomatic; love the tests; only have some feedback on what feels like an abstraction collision between a flag being "enabled" | "disabled" vs enabled with a status. I want to do a better job modeling the different between flags that are enabled vs disabled vs stale vs inactive (especially since I think it'd be cool for folks to just disable flags that are stale and have that "just work", if possible).
Problem
This serves as a starting point for #16497
By hitting this new endpoint in the Feature Flag > Usage tab, we can show users when their flag isn't being used anymore and is ripe for deletion from Posthog AND in their codebase. Eventually, we can use this status checking logic as a way to automate the archival of flags or give users helpful hints about flag-related tech debt in general
Changes
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?