Skip to content

[release-2.0] Use IsRetryable instead of IsConflict for terminal errors#778

Merged
mandre merged 1 commit into
release-2.0from
bp-release-2.0-000e8ba
May 5, 2026
Merged

[release-2.0] Use IsRetryable instead of IsConflict for terminal errors#778
mandre merged 1 commit into
release-2.0from
bp-release-2.0-000e8ba

Conversation

@orc-backport-bot
Copy link
Copy Markdown

Backport: #771

Rewrite orcerrors.IsRetryable and replace all uses of orcerrors.IsConflict with !orcerrors.IsRetryable when classifying errors as terminal in create and update paths. IsConflict only caught HTTP 409 responses, but non-HTTP errors from gophercloud (e.g. client-side validation such as banned value_spec keys) would cause infinite retries.

The rewritten IsRetryable returns true for more errors that may succeed when retried without changes to the spec:

  • HTTP error responses other than 409 are retryable (some 4xx errors like 400 Bad Request can be transient, e.g. when a dependency is not yet ready in OpenStack)
  • HTTP 409 Conflict is not retryable
  • Non-HTTP errors from gophercloud are not retryable

The check is now nested inside an if err != nil guard for clarity and safety, matching the pattern already used in CreateResource paths.

Also add godoc comments to all public functions in the errors package.

Closes #241

Rewrite orcerrors.IsRetryable and replace all uses of orcerrors.IsConflict
with !orcerrors.IsRetryable when classifying errors as terminal in create
and update paths. IsConflict only caught HTTP 409 responses, but non-HTTP
errors from gophercloud (e.g. client-side validation such as banned
value_spec keys) would cause infinite retries.

The rewritten IsRetryable returns true for more errors that may succeed
when retried without changes to the spec:
- HTTP error responses other than 409 are retryable (some 4xx errors
  like 400 Bad Request can be transient, e.g. when a dependency is not
  yet ready in OpenStack)
- HTTP 409 Conflict is not retryable
- Non-HTTP errors from gophercloud are not retryable

The check is now nested inside an `if err != nil` guard for clarity
and safety, matching the pattern already used in CreateResource paths.

Also add godoc comments to all public functions in the errors package.

Closes #241
@orc-backport-bot orc-backport-bot Bot requested a review from mandre May 5, 2026 05:43
@github-actions github-actions Bot added the v2.0 This PR targets v2.0 label May 5, 2026
@mandre mandre enabled auto-merge May 5, 2026 05:45
@github-actions github-actions Bot added the semver:patch No API change label May 5, 2026
@mandre mandre added this pull request to the merge queue May 5, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks May 5, 2026
@mandre
Copy link
Copy Markdown
Collaborator

mandre commented May 5, 2026

Github hiccup.

@mandre mandre added this pull request to the merge queue May 5, 2026
Merged via the queue into release-2.0 with commit d416ede May 5, 2026
10 checks passed
@mandre mandre deleted the bp-release-2.0-000e8ba branch May 5, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch No API change v2.0 This PR targets v2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant