aws / aws/aws-lambda-go

Mismatched CodePipeline CloudWatch fields

Offen
#421 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
bug type/events
Vorherrschende Sprache
Go
Sterne
3.8k
Forks
578
Ø Merge
8 Std. 18 Min.
Gemergte PRs (30 T.)
1

Beschreibung

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!

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start in events/codepipeline_cloudwatch.go at the referenced lines for the CodePipelineEventDetail and CodePipelineEventDetailType version fields. Compare those declarations with the reported JSON unmarshalling errors and the comments, then confirm that representative numeric and string version values decode successfully with the corrected types.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
go
Bereich
backend
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.