Cached flags collide between two client instances on different environments (cache not namespaced per environment)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、2つのFlagsmithクライアントがflagsを取得するときに使用されるキャッシュパスを追跡します。これには、リクエストURLとX-Environment-Keyヘッダーがキャッシュキーにどのように寄与するかも含まれます。同じベースURLに対して異なる環境キーを使用し、Flagsmith.sharedシングルトンの場合も含めて、issueの2クライアントシーケンスを再現します。完了の条件は、各クライアントが他のインスタンスの値を上書きすることなく、一貫して自身のキャッシュ済みflagsを受け取ることです。
索引モデルが issue の本文から書いたものです。
説明
When two Flagsmith client instances run in the same app on different environment keys with caching enabled, they can serve or overwrite each other's cached flags.
Use case: a host app uses the Flagsmith iOS SDK, and a third-party SDK embedded in the same app also uses the Flagsmith SDK, each configured with its own environment key against the same base URL.
Observed behaviour: with caching on, flags from one environment can be returned for the other, or the two instances overwrite each other's cached values.
Likely cause (to validate): the cache appears keyed on request URL only. The environment is sent as the X-Environment-Key header and the flags path is fixed, so two instances on the same base URL share a cache entry. On iOS this is compounded by Flagsmith.shared being a singleton.
Steps to reproduce:
- Create two Flagsmith clients in one app, each with a different environment key, same API base URL, caching enabled.
- Fetch flags on client A, then client B.
- Observe client B serving client A's cached flags, or the two overwriting each other.
Proposed direction: namespace the cache per environment key so instances don't collide
- 主要言語
- Swift
- スター
- 17
- フォーク
- 18
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 8
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Flagsmith/flagsmith-ios-client のほかの issue
-
Dependency Dashboardオープン
難易度 1/5 1時間未満 初心者へのやさしさ 1/100
Flagsmith/flagsmith-ios-client#129 ·
メンテナーはふだん 1 日以内に返信
-
Surface engine reasons in SDK response objects対応中かも @marc-merino が 38 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
Flagsmith/flagsmith-ios-client#106 ·
メンテナーはふだん 1 日以内に返信
-
Can we allow customers to provide their own URLSessionConfiguration class再び着手できるかも @gazreese が 404 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
Flagsmith/flagsmith-ios-client#94 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
Flagsmith/flagsmith-ios-client#92 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Flagsmith/flagsmith-ios-client#73 ·
メンテナーはふだん 1 日以内に返信
Flagsmith/flagsmith-ios-client の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Ebullioscopic/Atoll#930 ·
メンテナーはふだん 2 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apple/swift-argument-parser#1007 ·
メンテナーはふだん 3 日以内に返信
-
area:development bug triage:needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
vburojevic/hermes#123 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
jaywcjlove/awesome-mac#4631 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Muesli-HQ/muesli#764 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信