Ruby, PHP, Elixir and Edge SDKs: flag evaluation does not send the user's attributes

未关闭
#1,720 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃

调研方向

Start with the evaluation request in Ruby client.rb around lines 60–71, PHP, Elixir, and Edge client.ts around line 161; compare how Python, JavaScript, and Go send context. Add the requested exact-URL regression tests for each SDK, checking special characters, cache keys, and errors or logs, and replace each SDK page's limit sentence. The work is done when all four SDKs send encoded attributes and their tests pass.

由索引模型根据 Issue 内容生成。

描述

bug post-launch

The Ruby, PHP, Elixir and Edge SDKs do not send the user's attributes when they evaluate a flag, so a flag targeting rule on attributes never matches from them. The user gets the global rollout answer instead (it fails closed).

Where: each builds GET /api/v1/feature-flags/evaluate/{key} with the user id only (Ruby client.rb around lines 60-71; PHP has no attributes parameter; Elixir and Edge (client.ts around line 161) likewise).

Who sees it: nobody yet through a published package: none of the four is published, and each SDK page already states the limit (docs/sdk/ruby.md around line 108, docs/sdk/php.md around lines 100-102, docs/sdk/elixir.md around line 138, docs/sdk/edge.md around line 290). Python, JavaScript, Go, React, React Native and both OpenFeature providers send context on flag evaluation. Java and .NET have their own issues.

Fix (per SDK):

  • Ruby: send context (URL-encoded JSON of the attributes) on flag evaluation; leave it out when there are no attributes.
  • PHP: same.
  • Elixir: same.
  • Edge: same.
  • Each with an exact-URL regression test (an attribute value containing +, &, =, #, a space and a non-ASCII character), the cache key kept as user + flag, no query string in errors or logs, and its page's limit sentence replaced.

Release note: each SDK's first publish waits for its part of this fix. That includes Edge, which already has an npm publish path.

主要语言
Python
星标
0
派生
4
平均合并
5 小时 19 分钟
30 天内合并 PR
503

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Controlvar/controlvar 的其他 Issue

查看 Controlvar/controlvar 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。