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

fix: equality check on feature strategy #2145

Merged
merged 1 commit into from
Oct 6, 2022
Merged

Conversation

FredrikOseberg
Copy link
Contributor

About the changes

When we added equality checks on feature strategies, we failed to account for the fact that lastUpdatedAt will update on the feature toggle every time an SDK has asked for that feature. This triggers the stale data notification, because the feature toggle has in fact changed, but not in any meaningful way. Furthermore, it will trigger on every polling interval, which can be annoying for the user.

This adds a formatter to the hook that allows you to decide how the data should look before performing the equality check.

Closes # .

Important files

Discussion points

@vercel
Copy link

vercel bot commented Oct 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview Oct 6, 2022 at 11:51AM (UTC)
1 Ignored Deployment
Name Status Preview Updated
unleash-docs ⬜️ Ignored (Inspect) Oct 6, 2022 at 11:51AM (UTC)

Copy link
Contributor

@chriswk chriswk left a comment

Choose a reason for hiding this comment

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

LGTM

@FredrikOseberg FredrikOseberg merged commit 3d90a3d into main Oct 6, 2022
@FredrikOseberg FredrikOseberg deleted the fix/stale-data branch October 6, 2022 12:39
FredrikOseberg added a commit that referenced this pull request Oct 6, 2022
fix: add ability to format objects to perform equality checks on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants