Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Decoding protobufs when a new field comes in breaks

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

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ruby

Hướng nghiên cứu

Bắt đầu tại dòng 18 của lib/temporal/connection/converter/payload/proto_json.rb và kiểm tra cách trình phân tích protobuf của Ruby xử lý các trường được một dịch vụ Go upstream thêm vào. Tái hiện ParseError với một trường không xác định và xác định xem thư viện hay Google protobufs kiểm soát hành vi này. Hoàn tất khi một worker Ruby Temporal có thể deserialize thông báo mà không thất bại do trường mới.

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

Mô tả

There's a bug when an upstream service adds a new protocol buffer field and sends it along to a Ruby temporal worker. For example, we have a service written in Go that has an update protocol buffer message that is being serialized. The activity that executes with the message as an input is written in Ruby. The error is:

Google::Protobuf::ParseError: Error occurred during parsing: Error parsing JSON @1:845: No such field: newField

The offending line is here: https://github.com/coinbase/temporal-ruby/blob/3fbc675fbe24bce236fba2376910fd5dc9a9ff5f/lib/temporal/connection/converter/payload/proto_json.rb#L18

Honestly, I don't know if this is the responsibility of this library or from Google protobufs. In Go, you can explicitly say ignore unknown fields, however Ruby does not seem to have this behavior. So I'm not sure what to do or if anyone has any exceptions. Protobufs should be compatible with deserializing into messages it doesn't know about new fields.

Ngôn ngữ chính
Ruby
Star
287
Fork
113
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 coinbase/temporal-ruby

Tất cả issue của coinbase/temporal-ruby

Issue tương tự

Thêm issue về Ruby

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.