ENT-14416, CFE-4709: Retry on transient errors and fallback to cached releases.json - #198
Merged
Merged
Conversation
larsewi
commented
Aug 13, 2026
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
force-pushed
the
transient-errors
branch
from
August 13, 2026 10:40
da24d05 to
bc3a325
Compare
victormlg
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.