streamingfast / substreams

Powerful Blockchain streaming data engine, based on StreamingFast Firehose technology.
Apache License 2.0
160 stars 45 forks source link

feat: add `omitempty` in `Manifest` + `MarshalYAML` for `mapSlice` #463

Closed abhimanyusinghgaur closed 5 months ago

abhimanyusinghgaur commented 5 months ago

We have internal tooling that uses the Manifest struct to generate substreams.yaml files.

  1. Without the omitempty, those files have a lot of noise, so adding it.
  2. The mapSlice type didn't had a MarshalYAML defined resulting in it getting marshaled as a slice instead of a map. When reading back a substreams.yaml generated this way into the Manifest struct, the yaml decoder fails to decode it. So, added the MarshalYAML to fix the same.
abhimanyusinghgaur commented 5 months ago

Seems like those tests are failing on the HEAD commit in the base branch itself. Please let me know if I need to do anything.

maoueh commented 5 months ago

No need to wait, I don't think any test failed because of your change.