Repository navigation
NO-JIRA: Improve graceful shutdown LB test output with more details of late requests - #31158
Conversation
…quests Enhance further by correlating with graceful shutdown intervals
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
WalkthroughAudit-log graceful-shutdown tracking now records detailed late-request records (metadata, actor/source, response code, elapsed time placeholder) instead of only audit IDs, and correlates those records with GracefulAPIServerShutdown intervals to compute elapsed time since shutdown before test evaluation. ChangesGraceful Shutdown Request Tracking
Test Evaluation Integration
Sequence DiagramsequenceDiagram
participant AuditLog as AuditLog/Event
participant Analyzer as GracefulShutdownAnalyzer
participant Intervals as ShutdownIntervalsStore
participant Evaluator as TestEvaluator
AuditLog->>Analyzer: Emit audit event (with openshift.io/during-graceful)
Analyzer->>Analyzer: Build lateRequest (metadata, response code, elapsed=-1)
Evaluator->>Intervals: Provide finalIntervals
Evaluator->>Analyzer: invoke correlateWithShutdownIntervals(finalIntervals)
Analyzer->>Intervals: filter GracefulAPIServerShutdown intervals
Analyzer->>Analyzer: match lateRequest timestamp -> set elapsedSinceShutdown
Analyzer->>Evaluator: return correlated lateRequests for test evaluation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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
`@pkg/monitortests/kubeapiserver/auditloganalyzer/handle_requests_during_graceful_shutdown.go`:
- Around line 94-110: correlateWithShutdownIntervals mutates l.lateRequests and
elapsedSinceShutdown without holding the mutex used by HandleAuditLogEvent,
causing a data race; wrap the loop that updates l.lateRequests in the same
lock/unlock used for event ingestion (the mutex used inside HandleAuditLogEvent)
so all reads/writes to l.lateRequests are synchronized, ensuring you acquire the
mutex before iterating/updating and release it after the updates complete inside
lateRequestTracking.correlateWithShutdownIntervals.
🪄 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: cf7442b3-701c-4118-b427-e19e0075f519
📒 Files selected for processing (2)
pkg/monitortests/kubeapiserver/auditloganalyzer/handle_requests_during_graceful_shutdown.gopkg/monitortests/kubeapiserver/auditloganalyzer/monitortest.go
|
Scheduling required tests: |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dgoodwin, xueqzhan 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 |
|
/override ci/prow/e2e-vsphere-ovn-upi |
|
@dgoodwin: Overrode contexts on behalf of dgoodwin: ci/prow/e2e-vsphere-ovn-upi 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 kubernetes-sigs/prow repository. |
|
@dgoodwin: 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. |
|
@dgoodwin: This pull request explicitly references no 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. |
|
/verified bypass |
|
@dgoodwin: The 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. |
Enhance further by correlating with graceful shutdown intervals
Summary by CodeRabbit