Skip to content

ENT-14416, CFE-4709: Retry on transient errors and fallback to cached releases.json - #198

Merged
larsewi merged 2 commits into
cfengine:masterfrom
larsewi:transient-errors
Aug 13, 2026
Merged

ENT-14416, CFE-4709: Retry on transient errors and fallback to cached releases.json#198
larsewi merged 2 commits into
cfengine:masterfrom
larsewi:transient-errors

Conversation

@larsewi

@larsewi larsewi commented Aug 13, 2026

Copy link
Copy Markdown
Contributor
  • Added retries on transient HTTP errors
  • Now uses cached release data when cfengine.com is unavailable

A 502 from https://cfengine.com/release-data/enterprise/releases.json
made cf-remote fail the whole command. Requests failing with 408, 429 or
a 5xx status are now retried three times, doubling the delay between
each attempt.

Ticket: ENT-14416
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Release data cached less than an hour ago is used without contacting the
server at all. Older data is used as a fallback when the request fails
with a transient error, since stale release data beats no release data.

The cache is now named after the whole path of the URL. The basename
alone was not unique, enterprise and community both have a
releases.json.

Ticket: CFE-4709
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi
larsewi merged commit ad9fa56 into cfengine:master Aug 13, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants