Skip to content

Commit 1c1bd5c

Browse files
committed
docs: Describe what the all flags state holds before the client has LaunchDarkly data
1 parent f8ace1a commit 1c1bd5c

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎ldclient/async_client.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,9 @@ async def all_flags_state(self, context: Context, **kwargs) -> FeatureFlagsState
594594
log.warning("all_flags_state() called before client has finished initializing! Using last known values from feature store. This message is logged once.")
595595
else:
596596
# No data from LaunchDarkly is available. When the override layer holds entries,
597-
# the state is built from them alone. Otherwise the state is unavailable, as it
598-
# is without an override source.
597+
# the state is read through the overlay, which returns the override entries and
598+
# any data the store already holds. Otherwise the state is unavailable, as it is
599+
# without an override source.
599600
layer = self._data_system.override_layer
600601
if layer is None or layer.is_empty:
601602
log.warning("all_flags_state() called before client has finished initializing! Feature store unavailable - returning empty state")

‎ldclient/client.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,9 @@ def all_flags_state(self, context: Context, **kwargs) -> FeatureFlagsState:
584584
log.warning("all_flags_state() called before client has finished initializing! Using last known values from feature store. This message is logged once.")
585585
else:
586586
# No data from LaunchDarkly is available. When the override layer holds entries,
587-
# the state is built from them alone. Otherwise the state is unavailable, as it
588-
# is without an override source.
587+
# the state is read through the overlay, which returns the override entries and
588+
# any data the store already holds. Otherwise the state is unavailable, as it is
589+
# without an override source.
589590
layer = self._data_system.override_layer
590591
if layer is None or layer.is_empty:
591592
log.warning("all_flags_state() called before client has finished initializing! Feature store unavailable - returning empty state")

0 commit comments

Comments
 (0)