You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the UpsertPatchAsset method, asset merge happens only when the nested kind is map type. If the nested kind is slice type, it simply overwrites the field. It's how the library that is used works internally.
This causes an issue in the scenario - where there are two sources that push metadata to compass for the same asset - one being meteor and the other - some internal tool.
In this case:
When a user has added certain fields either one-time or through an internal tool based on business logic, to the asset. The asset merge will overwrite whenever the meteor runs and pushes the data.
Expected behavior
Asset merge should happen even at the nested slice level.
The text was updated successfully, but these errors were encountered:
Since there is no inherent type information available when merge happens, everything is either map[string]interface{} or interface{} or []interface{}. Finding which element exists in slice and which does not etc and take appropriate merge action is super difficult if not impossible without any type info. 😭
We can either - (just listing some options here; not exhaustive)
Accept that asset merge will only happen at map level and any slice Kind will be overwritten in API documentation as a limitation
Enforce only one source per asset type when pushing to compass.
Propose to send type/proto information along with the source, and compass will merge based on the proto definition from a defined schema registry.
Describe the bug
In the UpsertPatchAsset method, asset merge happens only when the nested kind is map type. If the nested kind is slice type, it simply overwrites the field. It's how the library that is used works internally.
This causes an issue in the scenario - where there are two sources that push metadata to compass for the same asset - one being
meteor
and the other - some internal tool.In this case:
Expected behavior
Asset merge should happen even at the nested slice level.
The text was updated successfully, but these errors were encountered: