-
Notifications
You must be signed in to change notification settings - Fork 35
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
Allow for alternative Prefix Trimming order #573
Comments
Hi, @spencerr
I am digesting the issue. Does the following scenario match your issue? You have App/Key1, Shared/Key1 and App/Key2 you want your App to use the value of App/Key1 and App/Key2. However, the Shared/Key1 will override the App/Key1 if you trimed the prefixes because "Shared/" place after "App/" in order.
May I ask what pain point you are experiencing now when you are using our Portal UI? If we are willing to make some improvement to portal UI, would you like to use label to group configuration? Do you want to display all keyvalues with different labels at the same time, but they are all grouped by labels (rather than being sortied by key name)? Something like:
Instead of
|
Thanks for the reply @zhiyuanliang-ms Yes, your scenario matches what I am describing. In our setup, we have various "groups" of variables that we may share between applications. Think items like redis connection information, application urls, etc. We'd like centralize configurations in a single place so we are not duplicating these values across different app configuration instances per application, and to opt-in or control the shared variables an application is given. Another additional limitation we run into is snapshots having a limit of 3 filters that can be applied. Right now I filter for the As far as UI experience, updating the hierarchy view to be able to group by Label and/or separator would be beneficial. |
Hi, @spencerr Here is the screenshot of my app config store By adjusting the order of the |
BTW, my previous comment is wrong.
According to the best practice, using different prefixs (as different namespaces) to group key-values is correct. (My previous comment is wrong. Sorry for the mistake.) |
@spencerr Does the option to filter by label on the configuration explorer page work for your scenario or did you mean something different? ![]() |
@zhiyuanliang-ms @amerjusupovic Filter by the label could work, grouping things does make things a bit easier to visualize. Best practices does seem to mention prefixes being used for separating variables per application however. |
Hi, @spencerr
Could you try to create two snapshots for each prefix like this: Instead of having one snapshot which used two key(prefix) filters like this: |
Hey @spencerr hope your day is going well. I will recap the issue here and will take as an example this store: This store has 2 snapshots.
You mentioned that you were unable to override some shared settings with a specific app settings. For a scenario like that, the recommendation is to have your
In this way, common keys in the shared config will always be overwritten by your specific app settings. Finally, if you try the snippet of code below, the output would be
In summary, it is the order of I will close this issue. Please re-open it if you have any extra questions/comments/concerns 😃 |
The current implementation of prefix trimming is backed by a SortedSet, removing the ability to trim prefixes in a specific order specified by the user.
I currently use a single App Configuration instance to serve configurations for multiple applications. The UI experience is not the best for displaying groups configurations by Label, so I utilize a prefix of
{app-name}/
orshared/
and such to group these configurations and display in the hierarchy view. The downfall of this is when I need to trim the prefixes for when an app specifically overrides one of the shared values, I am unable to because of the automatic ordering of the SortedSet.The text was updated successfully, but these errors were encountered: