WINC-1953: Add OCP-89616 log rotation verification test to OTE - #4375
WINC-1953: Add OCP-89616 log rotation verification test to OTE#4375rrasouli wants to merge 1 commit into
Conversation
|
@rrasouli: This pull request references WINC-1953 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rrasouli 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 |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds a pinned Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 6 warnings)
✅ Passed checks (13 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 |
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 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 `@ote/test/e2e/utils.go`:
- Line 28: Replace the public-registry value of windowsDebugImage with the
project’s release-payload or cluster-mirrored debug image reference, keeping the
existing helper’s expected Windows debug-image behavior intact.
In `@ote/test/e2e/winc.go`:
- Line 226: Update the smokerun test beginning with the “Verify log rotation for
kubelet and kube-proxy services” It block to explicitly skip or tag MicroShift
before it accesses OLM-backed resources such as Subscription, using the
repository’s established MicroShift skip mechanism.
- Around line 233-245: Update the subscription patch and deferred cleanup in the
surrounding test to preserve the existing spec.config.env list: capture the
original environment configuration before patching, modify only
SERVICES_LOG_FILE_SIZE, SERVICES_LOG_FILE_AGE, and SERVICES_LOG_FLUSH_INTERVAL,
then restore the exact original list during cleanup instead of replacing it with
an empty array.
- Around line 227-230: Validate that winNodeCount is non-empty after trimming
the command output and before splitting it in the Windows-node counting flow.
Fail immediately when no Windows nodes are returned, while preserving the
existing split and expectedNodes calculation for non-empty output.
- Around line 248-249: Update the reconciliation wait following the Subscription
patch in the test flow around waitWindowsNodesReady so it cannot succeed solely
because all Windows nodes are already Ready. Poll a post-patch convergence
signal, such as the updated WMCO generation/status or the expected service
command line containing the new flags, and proceed only after that signal
reflects the Subscription change.
- Around line 282-290: The rotation check around runDebugNodePS currently only
logs whether files exist and never triggers or waits for rotation. Update this
test flow to generate deterministic kubelet and kube-proxy activity exceeding
the 1 MiB threshold, then poll until rotated files appear and assert their
presence; apply the same validation to both log types instead of accepting an
empty result.
- Around line 242-245: Handle the error returned by Execute() in the cleanup
patch within the defer path, and fail the test immediately when reverting the
subscription fails. Update the surrounding cleanup flow near
waitWindowsNodesReady so the readiness check only runs after a successful
revert.
🪄 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: Pro Plus
Run ID: ec881869-2596-4451-b6e5-e79627dee3c9
📒 Files selected for processing (3)
ote/go.modote/test/e2e/utils.goote/test/e2e/winc.go
Port OCP-89616 from OTP PR #30034 to OTE. Rewrites SSH-based commands (runPSCommand, getSSHBastionHost, getServiceProperty) to use oc debug node with PowerShell per WINC-1931. New helpers: runDebugNodePS, waitWindowsNodesReady, getNodeNameFromIP. Adds missing k8s.io/externaljwt replace directive in ote/go.mod.
7618f26 to
92f5a90
Compare
|
@rrasouli: 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
Port OCP-89616 log rotation test from OTP PR #30034 to OTE, replacing SSH with oc debug node per WINC-1931.
What the test does (OCP-89616):
Other changes:
Related: WINC-1635, WINC-1953, OTP PR openshift/openshift-tests-private#30034
Test plan
Summary by CodeRabbit
New Features
Tests