-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Originally we were defining output metadata as a map[string]interface{}, and then just casting as needed any output metadata values to map[string]string. This worked fine when setting and then immediately checking values, because we set the metadata correctly to begin with. When a result is unmarshaled though, the json decoder is unmarshaling the output metadata values as map[string]interface{} and this prevented the helper methods for reading the metadata from working. I've updated the OutputMetadata type to be map[string]map[string]string so that we aren't relying on casts working, and to give the json decoder the hint it needs to initialize the types correctly. Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
- Loading branch information
Showing
3 changed files
with
40 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"id": "01G1VJH2HP97B5B0N5S37KYMVG", | ||
"claimId": "01G1VJGY43HT3KZN82DS6DDPWK", | ||
"created": "2022-04-29T16:09:47.190534-05:00", | ||
"status": "succeeded", | ||
"outputs": { | ||
"io.cnab.outputs.invocationImageLogs": { | ||
"contentDigest": "sha256:28ccd0529aa1edefb0e771a28c31c0193f656718af985fed197235ba98fc5696", | ||
"generatedByBundle": "false" | ||
}, | ||
"output1": { | ||
"contentDigest": "sha256:abc123", | ||
"generatedByBundle": "true" | ||
} | ||
} | ||
} |