Add FAR destructive remediation test scaffold - #22
Conversation
31d8115 to
332e585
Compare
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 Walkthrough📝 Walkthrough🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add constants and cluster-level helper functions for FAR destructive E2E tests: - farparams/const.go: timeout constants, fence agent names, AWS credential field names, CRD names, controller lease prefix - farutils/harness.go: platform detection via Infrastructure CR, AWS instance ID extraction, AWS credentials from CCO Secret, worker node selection with FAR leader exclusion, controller pod readiness check Part 1 of 3 for RHWA-962. Node disruption helpers in PR medik8s#21, test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Prow-compatible node operation helpers for FAR destructive E2E tests: - farutils/node.go: RunOnNode (oc debug wrapper with context propagation and timeout), StopKubelet/StartKubelet, boot ID tracking via API and oc debug, node readiness polling (WaitForNodeNotReady, WaitForNodeReady, WaitForNodeReboot) Part 2 of 3 for RHWA-962. Depends on PR medik8s#20 (constants). Test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
332e585 to
c2e55e1
Compare
Add constants and cluster-level helper functions for FAR destructive E2E tests: - farparams/const.go: timeout constants, fence agent names, AWS credential field names, CRD names, controller lease prefix - farutils/harness.go: platform detection via Infrastructure CR, AWS instance ID extraction, AWS credentials from CCO Secret, worker node selection with FAR leader exclusion, controller pod readiness check Part 1 of 3 for RHWA-962. Node disruption helpers in PR medik8s#21, test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add constants and cluster-level helper functions for FAR destructive E2E tests: - farparams/const.go: timeout constants, fence agent names, AWS credential field names, CRD names, controller lease prefix - farutils/harness.go: platform detection via Infrastructure CR, AWS instance ID extraction, AWS credentials from CCO Secret, worker node selection with FAR leader exclusion, controller pod readiness check Part 1 of 3 for RHWA-962. Node disruption helpers in PR medik8s#21, test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@tests/far-operator/tests/far_destructive.go`:
- Around line 155-161: The cleanup operations in the destructive flow are
silently ignoring errors by discarding return values with underscore assignment.
Instead of using `_ = farutils.StartKubelet(...)` and `_ =
farutils.WaitForNodeReady(...)` at the specified locations, capture the error
values returned by these functions into variables. Then propagate these captured
errors to the JustAfterEach block where they should be explicitly asserted or
logged to ensure failed cleanup operations become visible in the test output and
prevent cascading failures.
- Around line 159-162: The call to farutils.WaitForNodeReady references an
undefined constant farparams.NodeReadyTimeout at line 161, which will cause a
compilation failure. Replace farparams.NodeReadyTimeout with the correct
exported timeout constant from the tests/far-operator/internal/farparams
package. Check the farparams package to identify the actual exported constant
name that provides the node ready timeout value and update the WaitForNodeReady
function call to use that correct constant name.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 48015800-908d-44a0-98a5-bbf57b3802f2
📒 Files selected for processing (1)
tests/far-operator/tests/far_destructive.go
Add constants and cluster-level helper functions for FAR destructive E2E tests: - farparams/const.go: timeout constants, fence agent names, AWS credential field names, CRD names, controller lease prefix - farutils/harness.go: platform detection via Infrastructure CR, AWS instance ID extraction, AWS credentials from CCO Secret, worker node selection with FAR leader exclusion, controller pod readiness check Part 1 of 3 for RHWA-962. Node disruption helpers in PR medik8s#21, test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2866a88 to
a53a817
Compare
|
@ugreener: 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. |
Add constants and cluster-level helper functions for FAR destructive E2E tests: - farparams/const.go: timeout constants, fence agent names, AWS credential field names, CRD names, controller lease prefix - farutils/harness.go: platform detection via Infrastructure CR, AWS instance ID extraction, AWS credentials from CCO Secret, worker node selection with FAR leader exclusion, controller pod readiness check Part 1 of 3 for RHWA-962. Node disruption helpers in PR medik8s#21, test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Prow-compatible node operation helpers for FAR destructive E2E tests: - farutils/node.go: RunOnNode (oc debug wrapper with context propagation and timeout), StopKubelet/StartKubelet, boot ID tracking via API and oc debug, node readiness polling (WaitForNodeNotReady, WaitForNodeReady, WaitForNodeReboot) Part 2 of 3 for RHWA-962. Depends on PR medik8s#20 (constants). Test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Prow-compatible node operation helpers for FAR destructive E2E tests: - farutils/node.go: RunOnNode (oc debug wrapper with context propagation and timeout), StopKubelet/StartKubelet, boot ID tracking via API and oc debug, node readiness polling (WaitForNodeNotReady, WaitForNodeReady, WaitForNodeReboot) Part 2 of 3 for RHWA-962. Depends on PR medik8s#20 (constants). Test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Prow-compatible node operation helpers for FAR destructive E2E tests: - farutils/node.go: RunOnNode (oc debug wrapper with context propagation and timeout), StopKubelet/StartKubelet, boot ID tracking via API and oc debug, node readiness polling (WaitForNodeNotReady, WaitForNodeReady, WaitForNodeReboot) Part 2 of 3 for RHWA-962. Depends on PR medik8s#20 (constants). Test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Prow-compatible node operation helpers for FAR destructive E2E tests: - farutils/node.go: RunOnNode (oc debug wrapper with context propagation and timeout), StopKubelet/StartKubelet, boot ID tracking via API and oc debug, node readiness polling (WaitForNodeNotReady, WaitForNodeReady, WaitForNodeReboot) Part 2 of 3 for RHWA-962. Depends on PR medik8s#20 (constants). Test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Prow-compatible node operation helpers for FAR destructive E2E tests: - farutils/node.go: RunOnNode (oc debug wrapper with context propagation and timeout), StopKubelet/StartKubelet, boot ID tracking via API and oc debug, node readiness polling (WaitForNodeNotReady, WaitForNodeReady, WaitForNodeReboot) Part 2 of 3 for RHWA-962. Depends on PR medik8s#20 (constants). Test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Prow-compatible node operation helpers for FAR destructive E2E tests: - farutils/node.go: RunOnNode (oc debug wrapper with context propagation and timeout), StopKubelet/StartKubelet, boot ID tracking via API and oc debug, node readiness polling (WaitForNodeNotReady, WaitForNodeReady, WaitForNodeReboot) Part 2 of 3 for RHWA-962. Depends on PR medik8s#20 (constants). Test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Prow-compatible node operation helpers for FAR destructive E2E tests: - farutils/node.go: RunOnNode (oc debug wrapper with context propagation and timeout), StopKubelet/StartKubelet, boot ID tracking via API and oc debug, node readiness polling (WaitForNodeNotReady, WaitForNodeReady, WaitForNodeReboot) Part 2 of 3 for RHWA-962. Depends on PR medik8s#20 (constants). Test scaffold in PR medik8s#22. Jira: RHWA-962 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (2)
tests/far-operator/tests/far_destructive.go (2)
159-161: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winUndefined constant
farparams.NodeReadyTimeoutstill breaks compilation.This was previously flagged as a critical typecheck failure and remains unresolved in this version —
farparams.NodeReadyTimeoutis referenced but not defined per golangci-lint.#!/bin/bash rg -n 'NodeReadyTimeout|ReadyTimeout' tests/far-operator/internal/farparams/🤖 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 `@tests/far-operator/tests/far_destructive.go` around lines 159 - 161, The test in far_destructive.go still references an undefined farparams.NodeReadyTimeout, causing the compile failure. Update the WaitForNodeReady call to use a timeout value that actually exists in farparams, or add the missing exported constant in the farparams package and use that symbol consistently. Make sure the identifier used by WaitForNodeReady matches a defined timeout symbol so golangci-lint typecheck passes.Source: Linters/SAST tools
152-176: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winCleanup failures silently swallowed in safety-net path.
StartKubelet/WaitForNodeReadyerrors are discarded, anddeleteFARCR/deleteFARTCRare void functions that only log warnings internally — failed safety-net cleanup (e.g., a stuck kubelet, an undeleted FAR CR) becomes invisible in spec output, risking cascading failures across subsequent ordered specs in thisSerial, Orderedsuite. This was raised previously; the underlying pattern is still present.🤖 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 `@tests/far-operator/tests/far_destructive.go` around lines 152 - 176, The safety-net cleanup in the deferred block of far_destructive.go is still swallowing failures from StartKubelet and WaitForNodeReady, and deleteFARCR/deleteFARTCR only log internally, so cleanup problems never surface in the test. Update this cleanup path to capture and report errors from the kubelet restart/readiness wait and from FAR/FART deletion, and ensure the deferred safety-net in the far destructive spec fails or logs prominently when cleanup does not succeed so ordered serial runs can see the issue.
🤖 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 `@tests/far-operator/internal/farparams/const.go`:
- Around line 75-77: The new RemediationCRDeletionTimeout constant in farparams
is not being used by the deletion helpers, so the timeout value can drift from
its consumer. Update both deleteFARCR and deleteFARTCR in far_destructive.go to
pass farparams.RemediationCRDeletionTimeout into wait.PollUntilContextTimeout
instead of the hardcoded 2*time.Minute, and keep the constant as the single
source of truth.
In `@tests/far-operator/tests/far_destructive.go`:
- Around line 231-307: `deleteFARCR` and `deleteFARTCR` duplicate the same
cleanup flow and still use raw `wait.PollUntilContextTimeout` with a hardcoded
`2*time.Minute` instead of the project polling pattern. Refactor the shared
delete-and-wait logic into a helper that works for both GVKs, and switch the
post-delete wait to `Eventually`/`Consistently` using
`farparams.DefaultPollInterval` plus `farparams.RemediationCRDeletionTimeout`
(or the matching params constant) so the timeout is sourced from params rather
than inline. Keep the existing `k8sClient.Get`, `Delete`, and `GinkgoWriter`
error handling behavior, but apply it through the shared helper for both
`deleteFARCR` and `deleteFARTCR`.
- Line 66: The tests in far_destructive.go still reference missing helpers in
farutils, so the package won’t compile. Add or restore the expected helpers in
tests/far-operator/internal/farutils, specifically DetectPlatform and
CountReadyWorkerNodes, or update the call sites in the destructive test flow to
use the new symbol names consistently. Make sure the references in the main test
logic (including the platform detection and worker-node readiness checks) match
the available farutils API.
---
Duplicate comments:
In `@tests/far-operator/tests/far_destructive.go`:
- Around line 159-161: The test in far_destructive.go still references an
undefined farparams.NodeReadyTimeout, causing the compile failure. Update the
WaitForNodeReady call to use a timeout value that actually exists in farparams,
or add the missing exported constant in the farparams package and use that
symbol consistently. Make sure the identifier used by WaitForNodeReady matches a
defined timeout symbol so golangci-lint typecheck passes.
- Around line 152-176: The safety-net cleanup in the deferred block of
far_destructive.go is still swallowing failures from StartKubelet and
WaitForNodeReady, and deleteFARCR/deleteFARTCR only log internally, so cleanup
problems never surface in the test. Update this cleanup path to capture and
report errors from the kubelet restart/readiness wait and from FAR/FART
deletion, and ensure the deferred safety-net in the far destructive spec fails
or logs prominently when cleanup does not succeed so ordered serial runs can see
the issue.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 03e359ca-7d44-4178-a7d4-83b3924ce23b
📒 Files selected for processing (2)
tests/far-operator/internal/farparams/const.gotests/far-operator/tests/far_destructive.go
bfb7ddc to
f9b6ef0
Compare
- Add NodeNotReadyTimeout (2m) constant for verifying kubelet actually stopped before triggering FAR remediation - Update standalone FAR test flow: insert WaitForNodeNotReady between StopKubelet and FAR CR creation to prevent false-positive passes when StopKubelet returns nil but kubelet is still running
f9b6ef0 to
19051cf
Compare
|
Resolving 2 stale CodeRabbit threads: Thread 1 ( Thread 2 ( |
Merge the single-shot Get, single-shot Delete, and post-delete confirmation into a single wait.PollUntilContextTimeout loop. Transient API errors during node recovery now trigger retries instead of abandoning cleanup and leaving orphaned CRs. Addresses review feedback from razo7 on PR medik8s#22, aligning with the upstream deleteFAR retry pattern in fence-agents-remediation.
There was a problem hiding this comment.
♻️ Duplicate comments (2)
tests/far-operator/tests/far_destructive.go (2)
148-190: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winMake safety-net cleanup failure-scoped and fail visibly.
Line 150 only controls the log; the safety-net still restarts kubelet and deletes recorded CRs after successful specs. Also, Lines 160-174 only print warnings, then Line 176 clears
targetNode, so a failed node recovery can be hidden from the ordered suite.Suggested adjustment
JustAfterEach(func() { spec := CurrentSpecReport() - if spec.Failed() { - GinkgoWriter.Println( - "Test failed - running safety net cleanup") + if !spec.Failed() { + return } + + GinkgoWriter.Println( + "Test failed - running safety net cleanup") @@ if err := farutils.StartKubelet(ctx, nodeName); err != nil { - GinkgoWriter.Printf( - "Warning: safety net failed to start kubelet on %s: %v\n", - nodeName, err) + AddReportEntry("safety net cleanup", + fmt.Sprintf("failed to start kubelet on %s: %v", nodeName, err)) + Expect(err).ToNot(HaveOccurred()) } @@ if err := farutils.WaitForNodeReady( ctx, APIClient, nodeName, farparams.NodeReadyTimeout); err != nil { - GinkgoWriter.Printf( - "Warning: safety net node %s did not become Ready: %v\n", - nodeName, err) + AddReportEntry("safety net cleanup", + fmt.Sprintf("node %s did not become Ready: %v", nodeName, err)) + Expect(err).ToNot(HaveOccurred()) }🤖 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 `@tests/far-operator/tests/far_destructive.go` around lines 148 - 190, The safety-net cleanup in JustAfterEach is currently running for every spec and only logging warnings, so failures can be hidden and cleanup can affect successful tests. Gate the kubelet restart and CR deletion logic on CurrentSpecReport().Failed() (or equivalent failed-spec check) inside JustAfterEach, and make any StartKubelet/WaitForNodeReady failure surface as a failing test state instead of only printing via GinkgoWriter. Keep the cleanup references around targetNode, currentFARName, and currentFARTName, but only clear them after a successful failed-spec cleanup path.
253-278: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winUse Gomega polling so deletion failures fail the spec.
This still uses raw
wait.PollUntilContextTimeoutand only logs on timeout. Convert this cleanup wait toEventuallyWithOffsetwithfarparams.RemediationCRDeletionTimeoutandfarparams.DefaultPollIntervalso failures surface in Ginkgo output. As per coding guidelines, "UseEventually/Consistentlywith explicit timeout + poll interval from<op>params/medik8sparams— never usetime.Sleep".Suggested adjustment
- if waitErr := wait.PollUntilContextTimeout( - ctx, farparams.DefaultPollInterval, farparams.RemediationCRDeletionTimeout, true, - func(ctx context.Context) (bool, error) { - if err := k8sClient.Get(ctx, key, obj); err != nil { - if k8serrors.IsNotFound(err) { - return true, nil - } - - return false, nil - } - - if delErr := k8sClient.Delete(ctx, obj); delErr != nil { - if k8serrors.IsNotFound(delErr) { - return true, nil - } - - return false, nil - } - - return false, nil - }, - ); waitErr != nil { - GinkgoWriter.Printf( - "Warning: %s %s not fully deleted within %s: %v\n", - gvk.Kind, name, farparams.RemediationCRDeletionTimeout, waitErr) - } + EventuallyWithOffset(1, func() error { + obj := &unstructured.Unstructured{} + obj.SetGroupVersionKind(gvk) + + if err := k8sClient.Get(ctx, key, obj); err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + + return err + } + + if err := k8sClient.Delete(ctx, obj); err != nil && + !k8serrors.IsNotFound(err) { + return err + } + + if err := k8sClient.Get(ctx, key, obj); err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + + return err + } + + return fmt.Errorf("%s %s still exists", gvk.Kind, name) + }, farparams.RemediationCRDeletionTimeout, farparams.DefaultPollInterval). + Should(Succeed(), "%s %s was not deleted in time", gvk.Kind, name)🤖 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 `@tests/far-operator/tests/far_destructive.go` around lines 253 - 278, Replace the raw wait.PollUntilContextTimeout cleanup loop in the destructive test with Gomega EventuallyWithOffset so deletion errors fail the spec instead of only logging a warning. Keep the same deletion check logic using k8sClient.Get, k8serrors.IsNotFound, and k8sClient.Delete, but express it as an Eventually assertion with farparams.RemediationCRDeletionTimeout and farparams.DefaultPollInterval, and remove the GinkgoWriter timeout-only fallback so the failure is reported directly by Ginkgo.Source: Coding guidelines
🤖 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.
Duplicate comments:
In `@tests/far-operator/tests/far_destructive.go`:
- Around line 148-190: The safety-net cleanup in JustAfterEach is currently
running for every spec and only logging warnings, so failures can be hidden and
cleanup can affect successful tests. Gate the kubelet restart and CR deletion
logic on CurrentSpecReport().Failed() (or equivalent failed-spec check) inside
JustAfterEach, and make any StartKubelet/WaitForNodeReady failure surface as a
failing test state instead of only printing via GinkgoWriter. Keep the cleanup
references around targetNode, currentFARName, and currentFARTName, but only
clear them after a successful failed-spec cleanup path.
- Around line 253-278: Replace the raw wait.PollUntilContextTimeout cleanup loop
in the destructive test with Gomega EventuallyWithOffset so deletion errors fail
the spec instead of only logging a warning. Keep the same deletion check logic
using k8sClient.Get, k8serrors.IsNotFound, and k8sClient.Delete, but express it
as an Eventually assertion with farparams.RemediationCRDeletionTimeout and
farparams.DefaultPollInterval, and remove the GinkgoWriter timeout-only fallback
so the failure is reported directly by Ginkgo.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: db318145-56bf-445c-865c-d979e3461e07
📒 Files selected for processing (2)
tests/far-operator/internal/farparams/const.gotests/far-operator/tests/far_destructive.go
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/far-operator/internal/farparams/const.go
Addresses review question from razo7 on PR medik8s#22.
Reorder cleanup: CR deletion (API-only, no node dependency) runs first, then kubelet restart + node readiness use hard Expect assertions. With ContinueOnFailure, a cleanup failure marks the current spec as failed without aborting subsequent specs. Ginkgo v2 records both the original test failure and the cleanup failure separately in SpecReport.Failures. Addresses review feedback from razo7 on PR medik8s#22.
Addresses review follow-up from razo7 on PR medik8s#22.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: razo7, ugreener 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 |
Port 7 standalone destructive tests from ocp-edge-auto test_far_cli.py to Go/Ginkgo in system-tests. These fill the empty Context block established by the RHWA-962 harness (PRs medik8s#20, medik8s#22, medik8s#23). Tests added: - OCP-61229: Standalone FAR remediation on worker node - OCP-70638: Remediation on active controller node (failover) - OCP-65960: FAR NoSchedule taint verification during remediation - OCP-67015: FAR CR status conditions after remediation - OCP-66203: Default reboot action when --action omitted - OCP-66228: Workload pod deletion during remediation - OCP-70636: Controller leadership handover Also adds: - buildFARUnstructured helper (parallel to existing buildFARTUnstructured) - FAR condition and taint constants in farparams - README documentation for all 7 destructive tests Jira: RHWA-963
Port 7 standalone destructive tests from ocp-edge-auto test_far_cli.py to Go/Ginkgo in system-tests. These fill the empty Context block established by the RHWA-962 harness (PRs medik8s#20, medik8s#22, medik8s#23). Tests added: - OCP-61229: Standalone FAR remediation on worker node - OCP-70638: Remediation on active controller node (failover) - OCP-65960: FAR NoSchedule taint verification during remediation - OCP-67015: FAR CR status conditions after remediation - OCP-66203: Default reboot action when --action omitted - OCP-66228: Workload pod deletion during remediation - OCP-70636: Controller leadership handover Also adds: - buildFARUnstructured helper (parallel to existing buildFARTUnstructured) - FAR condition and taint constants in farparams - README documentation for all 7 destructive tests Jira: RHWA-963
Port 7 standalone destructive tests from ocp-edge-auto test_far_cli.py to Go/Ginkgo in system-tests. These fill the empty Context block established by the RHWA-962 harness (PRs medik8s#20, medik8s#22, medik8s#23). Tests added: - OCP-61229: Standalone FAR remediation on worker node - OCP-70638: Remediation on active controller node (failover) - OCP-65960: FAR NoSchedule taint verification during remediation - OCP-67015: FAR CR status conditions after remediation - OCP-66203: Default reboot action when --action omitted - OCP-66228: Workload pod deletion during remediation - OCP-70636: Controller leadership handover Also adds: - buildFARUnstructured helper (parallel to existing buildFARTUnstructured) - FAR condition and taint constants in farparams - README documentation for all 7 destructive tests Jira: RHWA-963
Port 7 standalone destructive tests from ocp-edge-auto test_far_cli.py to Go/Ginkgo in system-tests. These fill the empty Context block established by the RHWA-962 harness (PRs medik8s#20, medik8s#22, medik8s#23). Tests added: - OCP-61229: Standalone FAR remediation on worker node - OCP-70638: Remediation on active controller node (failover) - OCP-65960: FAR NoSchedule taint verification during remediation - OCP-67015: FAR CR status conditions after remediation - OCP-66203: Default reboot action when --action omitted - OCP-66228: Workload pod deletion during remediation - OCP-70636: Controller leadership handover Also adds: - buildFARUnstructured helper (parallel to existing buildFARTUnstructured) - FAR condition and taint constants in farparams - README documentation for all 7 destructive tests Jira: RHWA-963
Port 7 standalone destructive tests from ocp-edge-auto test_far_cli.py to Go/Ginkgo in system-tests. These fill the empty Context block established by the RHWA-962 harness (PRs medik8s#20, medik8s#22, medik8s#23). Tests added: - OCP-61229: Standalone FAR remediation on worker node - OCP-70638: Remediation on active controller node (failover) - OCP-65960: FAR NoSchedule taint verification during remediation - OCP-67015: FAR CR status conditions after remediation - OCP-66203: Default reboot action when --action omitted - OCP-66228: Workload pod deletion during remediation - OCP-70636: Controller leadership handover Also adds: - buildFARUnstructured helper (parallel to existing buildFARTUnstructured) - FAR condition and taint constants in farparams - README documentation for all 7 destructive tests Jira: RHWA-963
Summary
Add the Ginkgo test scaffold for FAR destructive E2E tests. Introduces an
Ordered,SerialDescribeblock withBeforeAllsetup (platform detection, AWS credential retrieval, node parameter building, FAR leader identification, 3+ worker node validation),JustAfterEachsafety-net cleanup (kubelet restart, node recovery, orphaned CR deletion), and helper functions for FART/FAR CR lifecycle management.Changes
tests/far-operator/tests/far_destructive.go: Serial/Ordered GinkgoDescribeblock with:BeforeAll: AWS platform gating, fence agent resolution, FAR controller readiness check, 3+ Ready worker node validation, AWS credential retrieval from CCO Secret, fence_aws shared parameter assembly, per-node EC2 instance ID mapping, FAR leader identificationJustAfterEach: safety-net cleanup (kubelet restart, node readiness wait, orphaned FAR/FART CR deletion)buildFARTUnstructured: helper to constructFenceAgentsRemediationTemplateCR as unstructureddeleteRemediationCR: unified cleanup helper with poll-until-deleted semanticsContextblocks for standalone FAR remediation (RHWA-963, 7 tests) and NHC+FAR interop (RHWA-1035, 4 tests)RemediationCRDeletionTimeoutintests/far-operator/internal/farparams/const.goDependencies
Part 3 of 3 for RHWA-962. Depends on #20 (constants + cluster helpers) and #23 (node disruption helpers).
Merge order: #20, then #23, then this PR. CI (lint/unit) will pass after both dependencies merge.
Jira: RHWA-962
Summary by CodeRabbit