-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
Add condition for getting max revision id from store #4549
Add condition for getting max revision id from store #4549
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@pangorgo is attempting to deploy a commit to the unleash-team Team on Vercel. A member of the Team first needs to authorize it. |
@@ -2,6 +2,8 @@ import { | |||
IEvent, | |||
IBaseEvent, | |||
SEGMENT_UPDATED, | |||
FEATURE_IMPORT, | |||
FEATURES_IMPORTED, |
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.
State service, which creates these event types, are deprecated and will go away in Unleash v6. We need to keep this until then.
About the changes
In our staging setup, we create ad-hoc environments and import Unleash state from production. After unleash is deployed on such environment, the import job kicks in and feeds Unleash instance with feature flags from production.
Between Unleash being up and running and the import job running, some applications start polling Unleash. They get an empty feature toggle list with
meta.revisionId=0
. Then apps use this as part ofeTag
header in subsequent requests. Even though after import Unleash server finally has toggles to serve, it doesn't because it calculates max revision id based on toggle updates (not nullfeature_name
column in query) orSEGMENT_UPDATED
.This change adds an extra condition to query so feature toggles import is considered something that should invalidate the cache.