Skip to content

Remove (extra) args from poll Checkin call #5517

@michel-laterman

Description

@michel-laterman

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions