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

web-provider: only active configuration fetched for the current context #6

Open
andreas-karlsson opened this issue Aug 3, 2023 · 1 comment

Comments

@andreas-karlsson
Copy link
Contributor

Expected behavior

When a new configuration is fetched it should only become active if the context it was fetched for, is (still) the current context when the fetch is resolved.

Actual behavior

If the context is changed in rapid succession we have a race condition. If the fetches don't resolve in the same order they were started, we might activate the "wrong" configuration.

See for instance here. Note: The same problem is applicable to initialise followed by a context change.

@Billlynch
Copy link
Collaborator

Note, this only makes sense in the static paradigm of OpenFeature, so the issue is only scoped to the web provider. IMO.

Billlynch added a commit that referenced this issue Aug 3, 2023
check the context against the global context when activating the configuration

closes #6
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

No branches or pull requests

2 participants