aws / aws/aws-lambda-go

Mismatched CodePipeline CloudWatch fields

Đang mở
#421 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
bug type/events
Ngôn ngữ chính
Go
Star
3.8k
Fork
578
Merge trung bình
8 giờ 18 phút
Pull request đã merge (30 ngày)
1

Mô tả

Hi all, thanks for your support on this library. I was recently trying to replace our homemade structs for CodePipeline events with the ones defined in this package but I'm running into the following errors unmarshalling the `version` fields in `CodePipelineEventDetail` and `CodePipelineEventDetail`:

```Go
json: cannot unmarshal number 2.0 into Go struct field CodePipelineEventDetail.detail.version of type int64: errorString null

json: cannot unmarshal string into Go struct field CodePipelineEventDetailType.detail.type.version of type int64: errorString null
```

The unmarshalling works when `CodePipelineEventDetail.detail.version` is a `float64` and `CodePipelineEventDetailType.detail.type.version` is a string (using our own structs). Would y'all mind taking another look at the types for the two `versions` fields?

Based on the comments for each of them, it sounds like there's some mismatch in the schema/documentation:
https://github.com/aws/aws-lambda-go/blob/96ab249f3eb7644ebc3bb7a190d268184fdd9f4e/events/codepipeline_cloudwatch.go#L82-L83

https://github.com/aws/aws-lambda-go/blob/96ab249f3eb7644ebc3bb7a190d268184fdd9f4e/events/codepipeline_cloudwatch.go#L105-L106

Thanks!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu trong events/codepipeline_cloudwatch.go tại các dòng được tham chiếu cho các trường version của CodePipelineEventDetail và CodePipelineEventDetailType. So sánh các khai báo đó với những lỗi JSON unmarshalling đã được báo cáo và các chú thích, sau đó xác nhận rằng các giá trị version dạng số và chuỗi mang tính đại diện được giải mã thành công bằng các kiểu đã sửa.

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

Đánh giá

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

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.