fix: add retries to assisted installer API calls - #202
Open
tonykay wants to merge 1 commit into
Open
Conversation
…d_scale The list_clusters, import_cluster, update_cluster, and create_infra_env calls had no retry/until wrappers. A transient SSO "invalid_grant" error during token exchange causes the entire role to fail immediately. Adds configurable ai_api_retries (default 5) and ai_api_delay (default 30s) variables, consistent with the existing approve_csr_retries pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
retries/delay/untilwrappers to 4 assisted installer API calls inhost_ocp4_assisted_scalethat previously had no retry logic:list_clusters,import_cluster,update_cluster,create_infra_envai_api_retries(default 5) andai_api_delay(default 30s) variables in role defaults, following the same pattern as existingapprove_csr_retries/approve_csr_delaywait_for_hostsalready had retries and is unchangedMotivation
Transient SSO
invalid_granterrors during Red Hat token exchange cause the role to fail immediately at the first API call. With 5 retries × 30s delay, the role tolerates up to 2.5 minutes of SSO instability before failing.Test plan
host_ocp4_assisted_scaleand verify worker scaling completesai_api_retries/ai_api_delayin catalog item vars works as expected🤖 Generated with Claude Code