-
Notifications
You must be signed in to change notification settings - Fork 39
Do not skip concerns for OKD #2385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe notification skip condition in the health check logic was refined to handle OKD variants differently. Previously, notifications were skipped when the latest successful build occurred within the last three attempts. Now, this skip is disabled for OKD builds, ensuring OKD variants always notify on first failure while non-OKD variants retain the original behavior. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes ✨ Finishing touches
Comment |
joepvd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: joepvd 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
doozer/doozerlib/cli/images_health.py (1)
163-169: Critical logic bug: Missing guard causes false positives for OKD.The modified condition lacks a check for
latest_success_idx > 0. Whenlatest_success_idx == 0(latest build succeeded), for OKD:
- Line 140-146 adds
LATEST_BUILD_SUCCEEDEDconcern- Line 163 condition evaluates to
False(since variant is OKD)- Falls through to else block, incorrectly adding
LATEST_ATTEMPT_FAILEDSimilarly, when
latest_success_idx == -1(never succeeded), OKD would add bothFAILING_AT_LEAST_FORandLATEST_ATTEMPT_FAILED.🐛 Proposed fix
- if self.variant is not BuildVariant.OKD and latest_success_idx <= 3: + if latest_success_idx > 0 and self.variant is not BuildVariant.OKD and latest_success_idx <= 3: # The latest attempt was a failure, but there was a success within the last 3 attempts: skip notification # Note: For OKD, we always notify on first failure, so this check is skipped self.logger.info( f'Latest attempt for {image_meta.distgit_key} failed, but the one before it succeeded, skipping notification.' ) return - else: + elif latest_success_idx > 0: # The latest attempt was a failure, and the last success was more than 3 attempts ago: add a concern
|
@locriandev: 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. |
images:health - Enable immediate failure notifications for OKD
Summary
Modified the
images:healthcommand to notify on the first build failure for OKD variant, bypassing the 3-attempt grace period used for OCP builds.Changes
doozer/doozerlib/cli/images_health.py:163to skip the "success within last 3 attempts" check whenvariantisBuildVariant.OKDRationale
OKD builds are slower than OCP builds. With the previous 3-attempt grace period, by the time a notification was sent, significant time had already passed. Immediate notifications allow faster response to build failures.
Impact
LATEST_ATTEMPT_FAILEDconcern on first failure