USHIFT-7132: Fix DNS resource config test timing#6787
Conversation
After MicroShift restart, the API server becomes ready before the DNS DaemonSet is updated with new resource values from config. The tests were checking immediately after restart, seeing stale values. Wrap DaemonSet resource assertions in Wait Until Keyword Succeeds (10 retries, 5s interval) to allow time for asset application, matching the retry pattern used in dns-custom-config.robot and c2cc/dns.robot. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@Neilhamza: This pull request references USHIFT-7132 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR refactors DNS resource validation tests in the Robot suite to use retry-based assertions. New wait-and-assert keywords wrap value retrieval with ChangesDNS Resource Assertion Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Neilhamza, pmtk The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified by CI |
|
@pacevedom: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@Neilhamza: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Restart MicroShift, the API server readiness (/readyz) returns beforestartDNSController()finishes applying the updated DaemonSet templateRoot Cause
Wait For MicroShiftchecks API server liveness and readiness, but the DNS DaemonSet update happens asynchronously after the API server is ready. The tests were asserting resource values immediately, before the DaemonSet spec was updated.Fix
Wrap all DaemonSet resource assertions in
Wait Until Keyword Succeeds 10x 5s(up to 50s of retries), matching the existing retry pattern used indns-custom-config.robotandc2cc/dns.robot.Affected tests (5 of 8):
Test plan
make verify-rfpasses locally🤖 Generated with Claude Code
Summary by CodeRabbit