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

Đang mở
#1,720 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
backend-api-design

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
0
Fork
4
Merge trung bình
5 giờ 19 phút
Pull request đã merge (30 ngày)
503

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Controlvar/controlvar

Tất cả issue của Controlvar/controlvar

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.