You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using local evaluation mode. If Flagsmith is unavailable when a new container starts, I want to use the most recent feature state available to me. It's important to avoid fallback to feature states that are too old. Also, I want to avoid additional work for developers to support the default state in code just for the rare case of Flagsmith downtime during a new container start.
I plan to save the environment document while building the container.
When Flagmisth becomes available, EnvironmentDataPollingManager will automatically update _environment, and we won't fallback to data from offline_handler anymore. So, it seems like no additional changes are needed.
Context
I'm using local evaluation mode. If Flagsmith is unavailable when a new container starts, I want to use the most recent feature state available to me. It's important to avoid fallback to feature states that are too old. Also, I want to avoid additional work for developers to support the default state in code just for the rare case of Flagsmith downtime during a new container start.
I plan to save the environment document while building the container.
I configured Flagsmith as follows:
But offline_handler is not used in local evaluation mode, so if during container start Flagsmith is unavailable, I get an implementation error:
Requirements
If Flagsmith is unavailable during container start, use environment from offline_handler until Flagsmith becomes available.
Implementation
_environment
is loaded from offline_handler at the very beginning, so it should be enough to catch api error if _environment is not empty in 2 places:When Flagmisth becomes available, EnvironmentDataPollingManager will automatically update _environment, and we won't fallback to data from offline_handler anymore. So, it seems like no additional changes are needed.
Additiona links
Here is a repository for reproducing the error.
The text was updated successfully, but these errors were encountered: