bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 58 forks source link

Investigate / resolve why LD config is being cached #4381

Closed severinbeauvais closed 4 years ago

severinbeauvais commented 4 years ago

In some situations, it seems the Launch Darkly config (ie, feature flags) are cached, so that the user is not seeing features that should be enabled, or is seeing features that should be disabled.

It's possible that a service worker is caching the LD config. Or it could be Chrome... Either way, we need this to stop happening. This ticket is to investigate and resolve this issue.

severinbeauvais commented 4 years ago

Whichever team / SME knows something about this... please share! :)

severinbeauvais commented 4 years ago

@sumesh-aot @saravankumarpa @pwei1018 Have you guys seen this before, and do you have any ideas how to resolve it?

saravanpa-aot commented 4 years ago

@sumesh-aot @saravankumarpa @pwei1018 Have you guys seen this before, and do you have any ideas how to resolve it?

Nope .Haven't seen this before.If you need a hand in debugging , very happy to do it together.

severinbeauvais commented 4 years ago

I also discussed this with Sumesh back on June 10. At the time, when my LD flags were being cached, I found that I had to clear Chrome's "site data and cookies". I also found that sometimes hard-refreshing the browser tab caused it to reload the flags, but not on subsequent soft reloads!?

cameron-eyds commented 4 years ago

Investigation Notes:

cameron-eyds commented 4 years ago

Due to our earlier findings, we updated our request to pull in the configuration file from OS. We ensured the response is not cached by our service worker, so that a fresh request is made when we refresh the app opposed to pulling a potentially outdated config file from the cache.

@riyazuddinsyed For QA/testing, i think it's safe to just ensure you are pulling in the ldClientId in the browser as well as testing the flags on/off as we did previously in Dev and Test.