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

Show identity overrides pagination warning #4838

Open
khvn26 opened this issue Nov 15, 2024 · 6 comments
Open

Show identity overrides pagination warning #4838

khvn26 opened this issue Nov 15, 2024 · 6 comments
Labels
feature New feature or request front-end Issue related to the React Front End Dashboard

Comments

@khvn26
Copy link
Member

khvn26 commented Nov 15, 2024

Currently, when /api/v1/environment-document starts serving paginated responses due to total overrides exceeding the 1MB response size limit, there's no way for the user to find out unless they notice missing overrides during local evaluation.

This will be the case for quite some time until all the server SDKs are updated to support pagination.

For now, we should check for additional pages and add a UI warning in the Environment context saying the following text:

Environment <environment> has reached an Identity overrides in Local Evaluation mode limit. Some of the overrides will not work in Local Evaluation mode. Turn off Local Evaluation mode for the SDKs that use it or remove unneeded identity overrides.

Use the logic below to determine whether the banner should be shown:

@khvn26 khvn26 added front-end Issue related to the React Front End Dashboard feature New feature or request labels Nov 15, 2024
@matthewelwell
Copy link
Contributor

Related to #4664

@matthewelwell
Copy link
Contributor

As discussed with @khvn26 , this isn't as simple as just getting the UI to display a warning, because the UI doesn't have access to a server key needed to retrieve the environment document and determine if the LINK header is there.

We'll need to implement something in the API to provide this information to the UI.

@matthewelwell
Copy link
Contributor

@khvn26 does the EnvironmentViewSet.get_document return the same header?

@jasonw-rr
Copy link

jasonw-rr commented Jan 8, 2025

@matthewelwell
Can we display this warning on admin UI or display as usage on Flagsmith's setting page instead?
https://app.flagsmith.com/project/{porject_id}/settings?tab=usage

At least it's more obvious to troubleshoot for engineers or flag managers

@matthewelwell
Copy link
Contributor

@jasonw-rr sorry, I'm not sure what you mean by 'instead' ? Our intention is to display this warning in the admin UI, yes.

@jasonw-rr
Copy link

@matthewelwell
Sorry, I got confused with the responses. (I thought you meant public client without server key)
Scratch my previous message.

We can access to server-side environment key via Admin UI, why can't we use it to get /api/v1/environment-document?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

No branches or pull requests

3 participants