Currently the call to checkin within the polling loop uses extra args that get stored within the bulk checkin's extraT struct. Having anything in this struct prevents the bulk checkin handler from re-using serializations for different agents; these args should be removed.
|
err := ct.bc.CheckIn(agent.Id, checkin.WithStatus(string(req.Status)), checkin.WithMessage(req.Message), checkin.WithComponents(rawComponents), checkin.WithVer(ver), checkin.WithUnhealthyReason(unhealthyReason)) // FIXME If we change to properly handle empty strings we could stop passing optional args here. |
|
if err != nil { |
|
zlog.Error().Err(err).Str(ecs.AgentID, agent.Id).Msg("checkin failed") |
|
} |
We should also test removing all optional args in this invocation as the purpose of the loop Checkin is to update the timestamps, not any of the other attributes
Currently the call to checkin within the polling loop uses extra args that get stored within the bulk checkin's
extraTstruct. Having anything in this struct prevents the bulk checkin handler from re-using serializations for different agents; these args should be removed.fleet-server/internal/pkg/api/handleCheckin.go
Lines 386 to 389 in 898abd5
We should also test removing all optional args in this invocation as the purpose of the loop
Checkinis to update the timestamps, not any of the other attributes