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(feature-flags): Auto rollback beta #12485

Merged
merged 36 commits into from
Nov 3, 2022
Merged

feat(feature-flags): Auto rollback beta #12485

merged 36 commits into from
Nov 3, 2022

Conversation

EDsCODE
Copy link
Member

@EDsCODE EDsCODE commented Oct 27, 2022

Problem

Hackathon from team experiments october offsite. Key motivation here is based on long term vision discussion we want feature flags to have more automated functionality. As a starter for our hackathon, we've decided to create an auto rollback trigger based on sentry metrics or insight metrics. This is a beta rollout for internal testing

Relevant links:
Long term vision: PostHog/posthog.com#4516
Related RFC for extension: https://github.com/PostHog/product-internal/issues/369

Changes

  • add ability to auto rollback feature flags based on sentry errors or insight changes
  • insight metric is based on 7 day rolling average
  • sentry metric is based on a simple threshold of error count
  • sentry metric condition is only usable if a sentry api key is provided in the instance settings of the organization

Screen Shot 2022-11-01 at 1 46 16 PM

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

How did you test this code?

@posthog-bot
Copy link
Contributor

Hey @EDsCODE! 👋
This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.

@liyiy
Copy link
Contributor

liyiy commented Nov 1, 2022

My only nit is that you can't see this on the feature flag's "view mode" so you'll have to go into "edit" mode just to see what auto rollback conditions you've set up. We don't really need anything fancy but a simple display could help a lot here?

Also there's a permanent spinner thing happening when I check the auto rollback conditions after going into "edit" mode

Screen Shot 2022-11-01 at 2 02 38 PM

Also do you mind filling in the summary a bit more about what this PR came out of (team offsite hackathon), and what its initial merge is for (internal testing), and adding any relevant links? 😁

@EDsCODE EDsCODE changed the title feat(feature-flags): auto rollback 2 feat(feature-flags): Auto rollback beta Nov 1, 2022
@EDsCODE
Copy link
Member Author

EDsCODE commented Nov 1, 2022

@liyiy here's the view. The loader should complete also now

Last thing of note is how to show an event/action with filters.
Screen Shot 2022-11-01 at 4 11 46 PM

Copy link
Contributor

@liyiy liyiy left a comment

Choose a reason for hiding this comment

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

LGTM! Final nit is whether you want to change the name of the migration to something more readable like "add feature flags auto rollback" instead of "auto4853475934857" but it's fine either way 👍

@EDsCODE EDsCODE merged commit ef17c83 into master Nov 3, 2022
@EDsCODE EDsCODE deleted the auto-rollback-2 branch November 3, 2022 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants