mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Address double json-unmarshal in note (#25454)
#24390 Add a comment to provide context on why it's done this way, and a suggestion to revisit it once the new `json/v2` is released
This commit is contained in:
parent
51fecdd91e
commit
d3ea62a8ce
1 changed files with 4 additions and 0 deletions
|
|
@ -2226,6 +2226,10 @@ func submitLogsEndpoint(ctx context.Context, request interface{}, svc fleet.Serv
|
|||
}
|
||||
|
||||
case "result":
|
||||
// NOTE(dantecatalfamo) We partially unmarshal the data here because osquery can send data we don't
|
||||
// support unmarshaling, like differential query results. We also pass the raw data to logging
|
||||
// facilities further down. Results are unmarshaled one at a time inside of SubmitResultLogs.
|
||||
// We should re-address this once json/v2 releases and we can speed up parsing times.
|
||||
var results []json.RawMessage
|
||||
// NOTE(lucas): This unmarshal error is not being sent back to osquery (`if err :=` vs. `if err =`)
|
||||
// Maybe there's a reason for it, we need to test such a change before fixing what appears
|
||||
|
|
|
|||
Loading…
Reference in a new issue