Fix the egress results serialization format#1521
Conversation
🦋 Changeset detectedLatest commit: 86da3e6 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR 💥 An error occurred when fetching the changed packages and changesets in this PR |
| FileResults []*livekit.FileInfo `json:"file_results,omitempty"` | ||
| StreamResults []*livekit.StreamInfo `json:"stream_results,omitempty"` | ||
| SegmentResults []*livekit.SegmentsInfo `json:"segment_results,omitempty"` | ||
| ImageResults []*livekit.ImagesInfo `json:"image_results,omitempty"` |
There was a problem hiding this comment.
is this currently snake case? what consumes this? does this break backward compatibility?
There was a problem hiding this comment.
This was currently not working because:
- cloud-api-server tries to parse the content of this field as if were in the same format as the analytics corresponding field
- egress is serializing this in different formats depending on the type of result without actually indicating what the type is
See https://linear.app/livekit/issue/CS-1673/v3-egress-missing-data-points
I can change the schema to write to a new column if you want to somehow keep compatibility with the data that's currently in the "result" column. Do we need to considering the context above?
There was a problem hiding this comment.
backward compatibility with the existing data isn't important but the way api server is parsing this is sketchy...
Updated egress results serialization format for better compatibility.
Only serialize in the non deprecated format so no "ResultType" field is needed.