USHIFT-6800: Add c2cc reboot tests#6943
Conversation
|
@vimauro: This pull request references USHIFT-6800 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 story 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. |
|
/label tide/merge-method-squash |
WalkthroughAdds Robot Framework coverage for C2CC reboot scenarios, including helper keywords to reconnect clusters and verify reboot completion, plus a suite that runs single and simultaneous reboot cases with connectivity, infrastructure, health, and DNS checks. ChangesC2CC reboot scenarios
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 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 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vimauro 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 |
|
/jira refresh |
|
@vimauro: This pull request references USHIFT-6800 which is a valid jira issue. 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. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/resources/c2cc.resource`:
- Around line 456-458: The re-registration flow in the remote cluster setup is
mutating `${C2CC_REMOTE_ALIASES}` before `Register Remote Cluster` succeeds,
which can leave teardown state inconsistent if that keyword fails. Update the
logic around `Remove Values From List` and `Register Remote Cluster` so the
alias is only removed after a successful re-registration, or use `TRY/FINALLY`
to restore/reconcile `${C2CC_REMOTE_ALIASES}` on failure. Keep the
teardown-tracked alias list in sync in the re-registration path used by `Wait
Until Keyword Succeeds`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 52322569-b28b-466c-bc7a-ba41b45857c4
📒 Files selected for processing (2)
test/resources/c2cc.resourcetest/suites/c2cc/reboot.robot
| ${kubeconfig}= Get From Dictionary ${C2CC_KUBECONFIGS} ${alias} | ||
| Remove Values From List ${C2CC_REMOTE_ALIASES} ${alias} | ||
| Register Remote Cluster ${alias} ${host} ${port} ${kubeconfig} |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Re-registration is not failure-safe for teardown.
Remove Values From List drops the alias from ${C2CC_REMOTE_ALIASES} before Register Remote Cluster re-adds it. If Register Remote Cluster errors (host still down), the alias is gone from the tracked list. Within Wait Until Keyword Succeeds retries this self-heals, but if all retries exhaust, Teardown All Remote Clusters will never switch to / close that connection, leaking it and leaving teardown state inconsistent.
Consider only mutating the tracking list after a successful re-registration, or guarding with TRY/FINALLY so the list is reconciled even on the failure path.
Based on learnings: teardown state (the alias/interface list consumed by teardown keywords) must be populated reliably even when the mutating keyword errors before completing.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@test/resources/c2cc.resource` around lines 456 - 458, The re-registration
flow in the remote cluster setup is mutating `${C2CC_REMOTE_ALIASES}` before
`Register Remote Cluster` succeeds, which can leave teardown state inconsistent
if that keyword fails. Update the logic around `Remove Values From List` and
`Register Remote Cluster` so the alias is only removed after a successful
re-registration, or use `TRY/FINALLY` to restore/reconcile
`${C2CC_REMOTE_ALIASES}` on failure. Keep the teardown-tracked alias list in
sync in the re-registration path used by `Wait Until Keyword Succeeds`.
Source: Learnings
| Suite Setup Setup | ||
| Suite Teardown Teardown | ||
|
|
||
| Test Tags c2cc |
There was a problem hiding this comment.
If they can fit into single scenario, then definitely. If not, it should be separate one.
Except I'd replace c2cc with disruptive. If c2cc is present, it would run within regular scenarios.
| Wait For Test Pods | ||
| Wait For Service Endpoints | ||
|
|
||
| Verify Full C2CC Stack |
There was a problem hiding this comment.
|
@vimauro: The following test failed, say
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 by CodeRabbit