Skip to content

CNF-26102: Fix istiocsr updateCondition error aggregation bug#462

Open
sebrandon1 wants to merge 1 commit into
openshift:masterfrom
sebrandon1:fix/istiocsr-update-condition-bug
Open

CNF-26102: Fix istiocsr updateCondition error aggregation bug#462
sebrandon1 wants to merge 1 commit into
openshift:masterfrom
sebrandon1:fix/istiocsr-update-condition-bug

Conversation

@sebrandon1

@sebrandon1 sebrandon1 commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes a bug where updateCondition in istiocsr utils.go:484 aggregated {err, errUpdate} instead of {prependErr, errUpdate}, silently dropping the original reconcile error when both the reconciliation and status update fail
  • The trustmanager version of the same function correctly uses prependErr
  • One-line fix: err to prependErr

Test plan

  • Existing unit tests pass (go test ./pkg/controller/istiocsr/... -count=1 — 117 passed)
  • make lint clean
  • CI

Summary by CodeRabbit

  • Bug Fixes
    • Corrected error reporting in a specific update condition flow.
    • Ensured callers receive the appropriate combination of underlying errors when multiple issues occur.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 23, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 23, 2026

Copy link
Copy Markdown

@sebrandon1: This pull request references CNF-26102 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Fixes a bug where updateCondition in istiocsr utils.go:484 aggregated {err, errUpdate} instead of {prependErr, errUpdate}, silently dropping the original reconcile error when both the reconciliation and status update fail
  • The trustmanager version of the same function correctly uses prependErr
  • One-line fix: err to prependErr

Test plan

  • Existing unit tests pass (go test ./pkg/controller/istiocsr/... -count=1 — 117 passed)
  • make lint clean
  • CI

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.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7a4e3f07-5bdd-423e-bc15-377ffc619756

📥 Commits

Reviewing files that changed from the base of the PR and between 874b029 and 45ba1c0.

📒 Files selected for processing (1)
  • pkg/controller/istiocsr/utils.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/controller/istiocsr/utils.go

Walkthrough

The updateCondition method now aggregates prependErr with errUpdate when prependErr is present.

Changes

Error aggregation correction

Layer / File(s) Summary
Update condition error handling
pkg/controller/istiocsr/utils.go
updateCondition combines prependErr and errUpdate in the affected branch.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: swghosh, trilokgeer

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing the istiocsr updateCondition error aggregation bug.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed No test files changed; the PR only edits utils.go, so it introduces no Ginkgo titles to audit.
Test Structure And Quality ✅ Passed PASS: PR only changes non-test code (pkg/controller/istiocsr/utils.go); no Ginkgo tests were added or modified, so this check is not applicable.
Microshift Test Compatibility ✅ Passed Only pkg/controller/istiocsr/utils.go changed; no new Ginkgo/e2e tests or MicroShift-sensitive APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only changes controller utility logic; no new Ginkgo tests were added, so SNO-specific compatibility is not implicated.
Topology-Aware Scheduling Compatibility ✅ Passed Only utils.go changed, fixing error aggregation in updateCondition; no topology, replica, affinity, nodeSelector, or scheduling logic was modified.
Ote Binary Stdout Contract ✅ Passed The PR only changes error aggregation in updateCondition; no process-level stdout writes or suite/main setup code were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only changes pkg/controller/istiocsr/utils.go, with no IPv4 or external-connectivity assumptions.
No-Weak-Crypto ✅ Passed Touched utils.go only aggregates errors; imports are K8s/common packages, and no MD5/SHA1/DES/RC4/ECB/custom crypto or secret comparisons appear in the changed code.
Container-Privileges ✅ Passed PASS: The PR only changes pkg/controller/istiocsr/utils.go; no container/K8s manifest files were modified, and no new privileged settings were introduced.
No-Sensitive-Data-In-Logs ✅ Passed The only change is an error-aggregation operand in updateCondition; no logging statements were added or modified, so no sensitive data exposure is introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from TrilokGeer and swghosh July 23, 2026 21:45
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sebrandon1
Once this PR has been reviewed and has the lgtm label, please assign mytreya-rh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

When both a reconciliation failure and a status update failure occur,
updateCondition aggregated {err, errUpdate} instead of {prependErr,
errUpdate}, silently dropping the original reconcile error. The
trustmanager version of the same function correctly uses prependErr.
@sebrandon1
sebrandon1 force-pushed the fix/istiocsr-update-condition-bug branch from 874b029 to 45ba1c0 Compare July 24, 2026 02:31
@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@sebrandon1: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants