feat: allow computed fractional bucket variants
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
在 Python SDK 贡献中找到 fractional bucket 的评估及其测试。阅读 bucketing 前如何评估和检查变体,然后添加一个测试,其中某个变体是类似 cat 的 JSON Logic 表达式。确认该表达式只评估一次、其结果会针对选定的 bucket 返回,并且 bucketing 仍只取决于 bucketing 值和权重。
由索引模型根据 Issue 内容生成。
描述
A fractional bucket variant can be any JSON Logic expression, not only a literal:
{
"state": "ENABLED",
"defaultVariant": "blue",
"variants": {
"red": "#FF0000",
"blue": "#0000FF"
},
"targeting": {
"fractional": [
[{ "cat": ["r", "ed"] }, 50],
["blue", 50]
]
}
}
- Evaluate each variant expression once, before bucketing, and return the result for the selected bucket.
- Don't reject a variant based on its result type. Pass the result through, and let the resolver handle it like any other targeting result.
- Bucketing doesn't change; it depends only on the bucketing value and the weights.
This may already work, or only need a variant type check relaxed. Either way, please add a test.
Why: this allows the new resolve operator as a bucket variant (e.g. [{ "resolve": ["red", "SPLIT"] }, 50]), so each bucket can set its own reason and metadata.
References:
- Go implementation: open-feature/flagd#2127 (the
fractional.gochange and the "fractional bucket variant is terminal" test inresolve_test.go) - Gherkin scenarios: open-feature/flagd-testbed#448
- 主要语言
- Python
- 星标
- 27
- 派生
- 36
- 平均合并
- 4 小时 22 分钟
- 30 天内合并 PR
- 11
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
open-feature/python-sdk-contrib 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
open-feature/python-sdk-contrib#478 ·
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 79/100
open-feature/python-sdk-contrib#469 · 2 条评论 ·
维护者通常 1 天内回复
-
flagd: remove deprecated sync.GetMetadata RPC call (use sync_context)可能已有人在做 @buildingisfun23 于 31 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
open-feature/python-sdk-contrib#439 ·
维护者通常 1 天内回复
-
Restore the .gitmodules branch pins so Renovate tracks flagd submodule versions again可能已有人在做 @aepfli 于 66 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
open-feature/python-sdk-contrib#421 ·
维护者通常 1 天内回复
-
A boolean flag satisfies a Float request in flagd-core: bool is a subclass of int可能已有人在做 @abhinavrastogi2627 于 17 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 90/100
open-feature/python-sdk-contrib#417 · 1 条评论 ·
维护者通常 1 天内回复
查看 open-feature/python-sdk-contrib 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 61/100
scverse/infercnvpy#238 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
skrub-data/skrub#2442 ·
维护者通常 1 天内回复
-
due_at is one hour late on the autumn DST change day (real-time delta added to a zoneinfo datetime)未关闭
难度 2/5 1-3 小时 新手友好度 74/100
-
enhancement
难度 1/5 1 小时以内 新手友好度 94/100
warlock20/StartWithA#443 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
daniel-ospina/tortoise#13876 ·
维护者通常 1 天内回复