Commit Graph

2 Commits

Author SHA1 Message Date
Jonathan A. Sternberg
56ffa9f66b protobuf: fix casing of json attributes with the switch from gogo
With the switch from gogo, the `oneof` fields no longer have their
`json:"name"` fields emitted. Protobuf doesn't formally support these
fields and tells users to use the `protojson` package, but we didn't and
the official format is incompatible with the current format we use.

This adds some custom marshaling code to the already existant custom
unmarshaling code to ensure these fields are marshaled with the correct
casing.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-11-15 13:17:42 -06:00
Jonathan A. Sternberg
40fb5ce649 llbsolver: unmarshal protobuf objects into the provenance attestation correctly
This modifies how build steps are unmarshaled from JSON into the
provenance attestation. The current method doesn't correctly handle
protobuf attributes that are used with `oneof`.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2023-11-13 09:57:30 -06:00