test: add retry logic to TLS certificate validation in E2E test#5192
Draft
test: add retry logic to TLS certificate validation in E2E test#5192
Conversation
Address Copilot code review feedback: - Move cluster client creation outside Eventually block to avoid recreating on every poll - Remove per-attempt error logging to prevent CI log spam during retries - Add contextual error wrapping with API URL and certificate issuer for better debugging Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cssjr The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Skipping CI for Draft Pull Request. |
Collaborator
Author
|
/test all |
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.
Wrap API TLS certificate check in Eventually block to allow cluster API endpoint time to become available and serve valid certificates after cluster creation completes. Retries for 5 minutes with 10-second polling.
ARO-26761
What
Introduces retry logic for TLS certificate validation in E2E tests and addresses code review feedback to improve efficiency and error reporting.
Why
The test was experiencing false negative failures because the API endpoint wasn't immediately available with valid certificates after cluster creation completed. The cluster needs time to provision and configure TLS certificates.
Changes
Initial implementation
Eventuallyblock with 5-minute timeout and 10-second pollingExpectassertions to retryable error returnsCode review improvements (addressing Copilot feedback)
Eventuallyblock to avoid recreating the client on every poll (performance optimization)Testing
Tested in personal-dev-env. The retry logic works correctly - test retries for the full 5-minute window. CI will validate against proper environments.
Notes
This is a test-only change with no impact on production code.