neosync
neosync copied to clipboard
[NEOS-683] Job Run metadata always assuming one type of metadata
this results in an empty metadata object.
we should be looser here about the metadata we parse as it will be different per activity.
right now the backend always assumes a specific shape and returns it as such.
if len(attributes.Input.Payloads) > 1 {
var input mgmtv1alpha1.JobRunSyncMetadata
err := converter.GetDefaultDataConverter().FromPayload(attributes.Input.Payloads[1], &input)
if err != nil {
logger.Error(fmt.Errorf("unable to convert event input payload: %w", err).Error())
}
jobRunEvent.Metadata = &mgmtv1alpha1.JobRunEventMetadata{
Metadata: &mgmtv1alpha1.JobRunEventMetadata_SyncMetadata{
SyncMetadata: &mgmtv1alpha1.JobRunSyncMetadata{
Schema: input.Schema,
Table: input.Table,
},
},
}
}
From SyncLinear.com | NEOS-683