-
Notifications
You must be signed in to change notification settings - Fork 199
Only include fixed length fields in events #3076
Comments
How do we assert that the information container in events will never be too large? We can discriminate based on types. There's 3 scenarios to consider:
Using a custom serializer, we can skip fields that do not follow scenario 1 or 2. Bounded typesWe don't need to worry about these. It's unlikely we'll ever have so many of them that we start hitting size limits. Examples: Guids, DateTimes, Enums, Numbers Bounded data in unbounded typespublic record EventScalesetStateUpdated(
Guid ScalesetId,
PoolName PoolName,
ScalesetState State
) : BaseEvent();
If we follow the suggestion, the serialized Unbounded data in unbounded typespublic record EventCrashReported(
Report Report,
Container Container,
[property: JsonPropertyName("filename")] String FileName,
TaskConfig? TaskConfig
) : BaseEvent()
public record Report(
string? InputUrl,
BlobRef? InputBlob,
string Executable,
string CrashType,
string CrashSite,
List<string> CallStack,
string CallStackSha256,
...
); In In this case, only the fields that follow scenario 1 or 2 will be serialized. So the final serialized type will look like: {
"report": {
"inputBlob": "https://example.com/some-blob-ref"
/* no inputUrl, no executable, no call stack, no crashType, etc. */
},
"container": "some-container-name",
"filename": "some-file-name",
"taskConfig": {
/* follows the same rules as report */
}
} |
I think we should allow any |
As a continuation of #2937, we must slim down the data contained by our events. This will be a breaking change and that will be reflected in both the OneFuzz version number and the event version number.
Which fields we choose to keep will vary event to event but in general:
Data that is OK to keep
Examples of data to remove
AB#141950
The text was updated successfully, but these errors were encountered: