-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] Feature flags and key changes not refreshed on triggered app config update in azure-spring-cloud-starter-appconfiguration-config 2.1.0 #24049
Comments
@saragluna could you follow up with @PbALpi7xEX |
Documentation typo as well to note...
Should read
Missing a "d" on enable... my feature flags weren't loading at first until I noticed this and decided to try ;-) |
@PbALpi7xEX I think this might be more than one issue. I have been able to replicate a similar issue but only with feature flags. Are you having a case where the trigger value changing doesn't cause a refresh too? Part of the issue might also be that the feature flag label only supports a single label, not multiple. I can work on adding it to this existing work item for feature flags as it is similar. Azure/AppConfiguration#497 Thanks for pointing out the typo. Will update that. I will continue to try and replicate the configurations not refreshing while I fix the feature flag one. |
Yes. Updating the trigger doesn't seem to get the application to refresh it's configuration. |
After you make the change do you see a logs that looks similar to this?
|
No |
Not even the first two? Without them a refresh isn't even checked for? In a previous version of the library did you use refresh? Refresh check with pull refresh are triggered from "activity", we define activity as requests to Spring Web endpoints. If they are not called then no refresh is done. You can manually try refreshing by doing calling |
Sorry.. I update a key, then the trigger key, then hit my app to trigger a request... I do see the following in my logs:
|
@PbALpi7xEX Did you not update the value of |
Yes, updated app.config.refreshTrigger |
@mrm9084 FYI.. I enabled debug and seeing the following:
Something in my config is causing it to skip?
|
@PbALpi7xEX That means refresh is disabled for some reason, or the trigger key didn't change. By any chance does you |
I am working on a sample that might help. It can be found here Azure-Samples/azure-spring-boot-samples#48. Going to add some steps for sample store creation. Hope it helps. |
Thanks... still can't get it working... looking at debug a bit closer, and looked into code... seems the etag checks never mismatch and triggering the refresh:
I see the logger.debug from above output the following in my console:
Looking into the history of my watch key in app config, I don't see any of the etags matching what is output in the debug console... not sure where "FKtNVZp4e4MtZtPu5Dfj2q4aLYw " is coming from, but not found in my watch key etag history at that timestamp. |
@PbALpi7xEX Can we try you creating a new basic sentinel key. Just to make sure do the following.
Update you config client app to use the key sentinel, with no label. Once you get it running do:
|
@mrm9084 Well interesting , after applying the sentinel key update as specified, and firing a request in the app, I saw the following:
So the sentinel key is not using the /application/ prefix in app configuration... All my other keys are, and loading correctly... My previous watch key was set with /application/ prefix: So it seems we shouldn't be prefixing the watch key with /application/ prefix? |
That is correct. We don't auto add prefixes to watch keys. This was to enable the system to work for people who both want and don't want the prefix on any keys. Feel free to add the prefix to you watch key, you just need to add it to your watch configuration and everything should work fine. Here is a list of all of the configurations and their default values. https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config#supported-properties |
Thanks... my bad, guess it wasn't clear to me in the documentation. Using the prefix in my boostrap properties works properly:
So i guess this just leaves the issue with feature flag refreshes then. |
@PbALpi7xEX triggering a refresh this was also updates feature flags. So that can be a work around. I have found the bug with the feature flags. It will be in the next release. |
@PbALpi7xEX 2.1.1 is released and should fix this last issue. Let me know if you have any further problems. |
Thanks @mrm9084 Noticed the update to 2.1.1 yesterday so pulled it in and seems all is working as it should. Have a good weekend |
Describe the bug
App configuration not refreshing with trigger key and refresh interval.
To Reproduce
Steps to reproduce the behavior:
Code Snippet
Implemented the following config in my bootstrap.properties:
Feature Flag check in code:
Expected behavior
Toggle a feature, but it is not picked up in code. App restart required for changes to apply.
Setup (please complete the following information):
The text was updated successfully, but these errors were encountered: