-
Task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
None
-
False
-
-
False
-
None
-
None
-
None
-
None
-
None
Related to: WINC-1585
Summary
Add optional WMCO operator log collection to winc-regression job for debugging specific failing test cases.
Background
When specific tests fail in winc-regression, we need WMCO operator logs to determine if it's a product bug or automation issue. This feature allows users to collect operator logs when debugging specific test cases.
User responsibility: User decides when to enable. If they enable for large test suites (Smokerun, Windows_Containers), logs may be large - this is user's choice.
Prerequisites
- COLLECT_WMCO_LOGS feature validated in winc-upgrade job (Stage 3)
- No issues reported from winc-upgrade usage
Implementation
1. Add Parameter (jobs/winc/winc-regression.groovy)
booleanParam\( 'COLLECT_WMCO_LOGS', false, ''' Collect WMCO Operator Logs Collect Windows Machine Config Operator logs during test execution and archive as artifacts. Enable this for debugging failing test cases. ''' \)
2. Add Log Collection to Pipeline (jobs/winc/winc-regression.jenkinsfile)
- Copy implementation pattern from winc-upgrade Stage 3
- Determine appropriate stage for log collection (likely the main test stage)
- Copy kubeconfig from Flexy artifacts
- Start background log collection with auto-retry
- Stop collection in post { always } block
- Archive logs as wmco-operator-logs.txt
3. Technical Details
- Default: false (disabled)
- User control: User decides when to enable (single test or full suite)
- Implementation: Copy proven code from winc-upgrade Stage 3
- No automatic logic: No code to detect test scenario size
Benefits
✅ User control - User decides when to collect logs
✅ Targeted debugging - Helpful for specific failing tests
✅ Proven implementation - Already validated in winc-upgrade
✅ Pod restart resilience - Auto-reconnects on pod restart
✅ Optional - No overhead unless enabled
Acceptance Criteria
- COLLECT_WMCO_LOGS parameter added (default: false)
- Log collection implemented in appropriate test execution stage
- Background process handles pod restarts gracefully
- Cleanup runs in post { always }
block
- Logs archived as wmco-operator-logs.txt
- No orphaned processes after job completes
Testing Plan
- Run with COLLECT_WMCO_LOGS: false - verify no impact
- Run with COLLECT_WMCO_LOGS: true on single test - verify logs collected
- Run with COLLECT_WMCO_LOGS: true on multiple tests - verify logs collected
- Verify no impact on job performance
Dependencies
- Requires successful validation of COLLECT_WMCO_LOGS in winc-upgrade job
- Should wait 1-2 weeks after winc-upgrade rollout