Skip to content

Failing to parse upgrade details should not be fatal to processing a checkin request #5199

@cmacknz

Description

@cmacknz

Follow up to #5176

Any error processing upgrade details is fatal to the checkin, which makes agent unable to get new configurations:

// Handle upgrade details for agents using the new 8.11 upgrade details field of the checkin.
// Older agents will communicate any issues with upgrades via the Ack endpoint.
if err := ct.processUpgradeDetails(r.Context(), agent, req.UpgradeDetails); err != nil {
return fmt.Errorf("failed to update upgrade_details: %w", err)
}

Upgrade details are nice to have, not having them is not fatal. When this happens we should strip out the failed upgrade details and replace them with a sentinel value.

We should likely define an "INVALID" upgrade details state or similar to act as this sentinel value:

enum:
- UPG_REQUESTED
- UPG_SCHEDULED
- UPG_DOWNLOADING
- UPG_EXTRACTING
- UPG_REPLACING
- UPG_RESTARTING
- UPG_WATCHING
- UPG_ROLLBACK
- UPG_FAILED

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions