-
Notifications
You must be signed in to change notification settings - Fork 25
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
Upsert flags when loading feature flags with computed errors #38
Conversation
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.
👍
@@ -131,7 +134,7 @@ internal class PostHogFeatureFlagsTest { | |||
} | |||
|
|||
@Test | |||
fun `merge feature flags if no errors`() { | |||
fun `merge feature flags if there are errors`() { |
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.
🤯 😊
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.
cheaper than the 1 billion dollar mistake tho :D
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.
I'd find these two easier to think about if they were generated by a method. So I could see the difference is the payload and the errorsWhileComputingFlags
But it's stylistic and easy to change so non-blocking
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.
yeah, I agree, that's why I named the files this way, it's a bit more obvious but there's no syntax highlighting for JSONs represented as Strings so it's also not ideal.
💡 Motivation and Context
https://github.com/PostHog/posthog-js-lite/blob/4a707fdc660785c187e0bfd99ec2df1887afcf5c/posthog-core/src/index.ts#L931
I did the wrong check.
Refactor for reading the JSON from resources instead of strings, its easier to maintain and read due to identation.
💚 How did you test it?
Unit tests
📝 Checklist