Mismatched CodePipeline CloudWatch fields
- 主要言語
- Go
- スター
- 3.8k
- フォーク
- 578
- 平均マージ
- 8時間 18分
- マージ済み PR(30日)
- 1
説明
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!
コントリビューションガイド
調査の方向性
CodePipelineEventDetail と CodePipelineEventDetailType の version フィールドについて、参照されている行の events/codepipeline_cloudwatch.go から始めます。これらの宣言を報告されている JSON unmarshalling エラーおよびコメントと比較し、その後、version の代表的な数値および文字列の値が、修正後の型で正常にデコードされることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100