Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ func kmsEncryptionTestsDetected(finalIntervals monitorapi.Intervals) bool {
// in openshift-apiserver and openshift-oauth-apiserver during KMS encryption tests.
// KMS encryption tests trigger multiple kube-apiserver rollouts (encrypt/decrypt cycles)
// that cascade into these namespaces, generating ScalingReplicaSet events.
// Observed: 58-82 times per run; threshold set to 100 with headroom.
// Observed: 58-106 times per run; threshold set to 120 with headroom.
func newKMSEncryptionTestScalingReplicaSetMatcher() EventMatcher {
return &SimplePathologicalEventMatcher{
name: "APIServerScalingReplicaSetDuringKMSEncryption",
Expand All @@ -1400,7 +1400,7 @@ func newKMSEncryptionTestScalingReplicaSetMatcher() EventMatcher {
monitorapi.LocatorDeploymentKey: regexp.MustCompile(`^apiserver$`),
},
messageReasonRegex: regexp.MustCompile(`^ScalingReplicaSet$`),
repeatThresholdOverride: 100,
repeatThresholdOverride: 120,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚖️ Poor tradeoff

Threshold value (120) contradicts PR description (150) and ignores prior feedback.

The repeatThresholdOverride is set to 120, but the PR title and description state the threshold is being increased to 150. Additionally, a past reviewer suggested that 110 would be more appropriate given the observed maximum of 106 events.

The current value of 120 provides reasonable headroom (~13% above the observed max), but the PR messaging is inconsistent and prior feedback appears unaddressed.

🔍 Suggested clarification

Either:

  1. Update the PR description to reflect the actual threshold of 120, or
  2. Change the code to 150 if that's the intended value, or
  3. Address the past review feedback suggesting 110 is sufficient
🤖 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 `@pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go`
at line 1403, The value assigned to repeatThresholdOverride in
duplicated_event_patterns.go (repeatThresholdOverride: 120) contradicts the PR
description that says the threshold was increased to 150 and ignores prior
feedback suggesting 110; fix by making the intent consistent: either update the
code to set repeatThresholdOverride to 150 to match the PR title/description, or
if 120 (or 110) is preferred, update the PR description and justification to
state that value and why (e.g., observed max = 106 with chosen headroom). Locate
the repeatThresholdOverride assignment in duplicated_event_patterns.go and
adjust the numeric constant or the PR text accordingly so code and PR messaging
align.

}
}

Expand Down