Skip to content

fix: retry on connection errors, covering server restarts and downtime - #41

Open
SansGuidon wants to merge 1 commit into
nemerosa:mainfrom
SansGuidon:fix/retry-transport-errors
Open

fix: retry on connection errors, covering server restarts and downtime#41
SansGuidon wants to merge 1 commit into
nemerosa:mainfrom
SansGuidon:fix/retry-transport-errors

Conversation

@SansGuidon

Copy link
Copy Markdown

AddRetryCondition replaces resty's built-in transport-error retry logic. The client gave up immediately on connection refused, DNS failures and timeouts regardless of --conn-retry-count and --conn-retry-wait.

Fix: also retry when err != nil.

Verified locally: stopped the server for 130s, ran yontrack project list against it. Retried 44 times and succeeded once the server came back up.

AddRetryCondition replaces resty's built-in transport-error retry logic.
The client gave up immediately on connection refused, DNS failures and
timeouts regardless of --conn-retry-count and --conn-retry-wait.

Fix: also retry when err != nil.

Verified locally: stopped the server for 130s, ran yontrack project list
against it. Retried 44 times and succeeded once the server came back up.
@SansGuidon

Copy link
Copy Markdown
Author

@dcoraboeuf Rationale: this should allow to avoid breaking our workflows during ontrack upgrades/downtimes when using the cli. By default a downgrade causes a state that is not correctly managed in resty V2 (they fix it in V3 but it's still in RC) so this raw mitigation is hopefully acceptable til resty v3 is mature and adopted in ontrack CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant