Commit a99c7d7
Add warning log for local flag evaluation cold start (#452)
* Add warning log when local flag evaluation called before flags loaded
When feature_enabled() is called with only_evaluate_locally=True before
flag definitions are fetched, the SDK silently returns None. This adds a
warning log so users can diagnose the issue immediately.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Move cold start warning to only fire for only_evaluate_locally=True
The warning was in _locally_evaluate_flag which runs for all flag
evaluations, including those that fall back to server-side evaluation.
Move it to the caller where only_evaluate_locally is known, so it only
fires when the caller explicitly opted out of the server fallback.
* Narrow cold start warning to only fire when flags were never fetched
Use `is None` instead of `not` to avoid firing when flags are loaded
but empty (401, 402, no personal_api_key), which already have their
own specific error logs.
* add changeset
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent b206669 commit a99c7d7
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1620 | 1620 | | |
1621 | 1621 | | |
1622 | 1622 | | |
1623 | | - | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
1624 | 1630 | | |
1625 | 1631 | | |
1626 | 1632 | | |
| |||
0 commit comments