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: respect environment if set on context #2206

Merged
merged 6 commits into from
Oct 19, 2022
Merged

Conversation

FredrikOseberg
Copy link
Contributor

This PR fixes an issue with the new frontend API where we would override environment set on the context to what the environment of the API key was. This will break feature toggles for older users of unleash because some might still be using the deprecated environment field on the SDKs.

About the changes

Closes # .

Important files

Discussion points

@vercel
Copy link

vercel bot commented Oct 19, 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 19, 2022 at 9:13AM (UTC)
1 Ignored Deployment
Name Status Preview Updated
unleash-docs ⬜️ Ignored (Inspect) Oct 19, 2022 at 9:13AM (UTC)

properties: ['some'],
});

expect(context.environment).toBe('development');
Copy link
Member

Choose a reason for hiding this comment

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

I would like to see another test proving environment will not be development when not set on context.

@ivarconr ivarconr merged commit b0626d4 into main Oct 19, 2022
@ivarconr ivarconr deleted the fix/create-context branch October 19, 2022 10:29
ivarconr pushed a commit that referenced this pull request Oct 19, 2022
When using the frontend api (embedded proxy) we should allow the use to self-define the environment on the proxy.
sighphyre pushed a commit that referenced this pull request Oct 27, 2022
When using the frontend api (embedded proxy) we should allow the use to self-define the environment on the proxy.
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