Expose upcoming scheduled changes in the environment document, so local-evaluation SDKs can flip flags exactly at live_from
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
環境ドキュメントの endpoint から始め、feature state を組み立てるサーバー側の mapper を追ってください。直接的な将来の FeatureState/version 行と、保留中のスケジュール済み change-sets がどのように表現されているかを読み、その後、存在する場合は関連する endpoint のテストを確認してください。完了の条件は、opt-in のレスポンスが影響を受ける各 feature state について最も近い将来の変更のみを公開し、パラメーターがない場合は既存のレスポンスを維持することです。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem?
When a change is scheduled via a future live_from, Flagsmith's server correctly promotes it to the "live" value once that time passes — but SDKs running in local evaluation mode (fetch the environment document once, cache it, evaluate flags in-process for low latency) only see that promotion on their next document poll strictly after live_from. With the default/typical refresh intervals many teams configure (often well beyond the default 60s to reduce API load), this means the actual observed flip time is live_from + up to one full refresh interval, and there's no way for the SDK to know in advance that a change is coming. The only current workarounds are polling much more frequently around the scheduled time (which the SDK can't do, since it doesn't know a schedule exists) or falling back to remote evaluation for that flag (which defeats the purpose of local evaluation).
Describe the solution you'd like
Add an opt-in query parameter (e.g. include_scheduled=true) to the environment document endpoint that, when present, attaches the single nearest not-yet-live future value to each affected feature state: scheduled_change: { live_from, enabled, feature_state_value }. Local-evaluation SDKs can then cheaply compare now() against the cached live_from on every flag-resolution call and start serving the scheduled value once it's reached — without waiting for or requiring a new document fetch. The field is omitted entirely when not requested, so existing SDKs and cached documents stay byte-for-byte unaffected (fully backward compatible, opt-in only).
We've prototyped this end-to-end: a server-side mapper change that merges scheduling information from both direct future FeatureState/version rows and pending scheduled change-sets (with an "earliest wins" rule when more than one candidate exists), plus a client-side implementation in flagsmith-java-client (a small model class with an isLive() check, applied at every flag-resolution entry point) and a corresponding option in the OpenFeature Java provider. In testing, a flag scheduled ~45s in the future correctly stayed at its old value right up to live_from, then flipped at live_from on an already-running client with zero new document fetches (refresh interval set far longer than the test window to isolate this from ordinary polling).
A notable side benefit: because every instance in a fleet independently prefetches the same scheduled_change (via its normal, already-staggered polling), and each one resolves maturity locally from its own clock rather than from when it happened to poll, all instances flip to the new value at essentially the same moment — bounded only by clock skew across the fleet, not by how staggered their poll timings are. Without this mechanism, instances that poll on independent/staggered schedules would pick up a promoted value at different times (each up to one refresh interval after live_from, and out of sync with each other by up to that same interval). This gives multi-instance deployments millisecond-level synchronized flag flips "for free," without needing a dedicated distributed-coordination mechanism (leader election, distributed lock, message bus, etc.) just to make a scheduled change take effect consistently across a fleet at the same instant.
Describe alternatives you've considered
- Poll more frequently as the scheduled time approaches — requires the SDK to already know a change is coming, which is the problem being solved, and increases load if applied broadly rather than narrowly.
- Push-based invalidation (webhook/SSE telling clients to refetch) — heavier infrastructure requirement, and most server-side SDKs in local-evaluation mode don't have an inbound channel to receive it; also doesn't remove the "refetch round trip" latency itself.
- Rely on remote evaluation for anything scheduled — works, but forces giving up local evaluation's low-latency, no-per-request-round-trip benefit specifically for flags that use scheduling.
Additional context
Known simplification in the prototype: only the single nearest upcoming change per feature state is exposed, not a full list of all pending future changes — intentional, since in Flagsmith's version-chain model only one transition is ever actionable at a time (the next one becomes visible on the following poll once the current one matures). Willing to share more implementation detail or open a draft PR to flagsmith-java-client (and discuss the OpenFeature provider separately) once maintainers confirm interest in the server-side API shape.
- 主要言語
- Python
- スター
- 9.9k
- フォーク
- 658
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 168
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Flagsmith/flagsmith のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Flagsmith/flagsmith#9119 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Fix Button Alignment in SDK Installation Section対応中かも @manueldezman が 3 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Flagsmith/flagsmith#9056 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Cloud Python warehouse snippet omits the import needed by its short-lived-job guidance対応中かも @jcd1991 が 4 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
Flagsmith/flagsmith#9045 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Expose whether an organisation is blocked for API usage対応中かも @PiUnknown が 38 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Flagsmith/flagsmith#8773 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
influx_query_manager doesn't catch ApiException, so Influx error responses 500対応中かも @SAY-5 が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Flagsmith/flagsmith#8510 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
Flagsmith/flagsmith の issue をすべて見る
似ている issue
-
claude-subscription-directsdk: tool calls with raw control characters in string values are droppedオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NousResearch/hermes-official-plugins#538 ·
メンテナーはふだん 3 日以内に返信
-
bug(qdiffusion): EnergyModel.score_visible_logits computes biased visible/hidden on-ratios when solver returns variable solution counts per candidate対応中かも @houzhongyu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
qboson/kaiwu-pytorch-plugin#2133 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MakazhanAlpamys/Soup#3415 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信