Skip to content

fix: log rows.Close() errors instead of silently discarding them - #13982

Open
praneshnikhar wants to merge 1 commit into
kubeflow:masterfrom
praneshnikhar:fix-rows-close-error-handling
Open

fix: log rows.Close() errors instead of silently discarding them#13982
praneshnikhar wants to merge 1 commit into
kubeflow:masterfrom
praneshnikhar:fix-rows-close-error-handling

Conversation

@praneshnikhar

@praneshnikhar praneshnikhar commented Aug 5, 2026

Copy link
Copy Markdown

Description

The migrateCleanupUniqueIndexes function in client_manager.go used _ = rows.Close() to suppress close errors from sql.Rows. This silently drops connection/IO errors that could indicate resource leaks or database issues.

Replaced _ = rows.Close() with a check that logs the error via glog.Warningf so close failures are visible in logs without altering control flow.

Change type

/kind bug

Changelog

fix: Log sql.Rows.Close() errors in client_manager.go instead of silently discarding them

The migrateCleanupUniqueIndexes function used _ = rows.Close() to suppress
close errors from sql.Rows. This silently dropped connection/IO errors that
could indicate resource leaks or database issues.

Replace _ = rows.Close() with a check that logs the error via glog.Warningf
so close failures are visible in logs without altering control flow.

Signed-off-by: praneshnikhar <praneshnikhar@gmail.com>
Copilot AI balanced review requested due to automatic review settings August 5, 2026 11:09
@google-oss-prow

Copy link
Copy Markdown

@praneshnikhar: The label(s) kind/fix cannot be applied, because the repository doesn't have them.

Details

In response to this:

Description

The migrateCleanupUniqueIndexes function in client_manager.go used _ = rows.Close() to suppress close errors from sql.Rows. This silently drops connection/IO errors that could indicate resource leaks or database issues.

Replaced _ = rows.Close() with a check that logs the error via glog.Warningf so close failures are visible in logs without altering control flow.

Change type

/kind fix

Changelog

fix: Log sql.Rows.Close() errors in client_manager.go instead of silently discarding them

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/test-infra repository.

@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mprahl for approval. For more information see the Kubernetes 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

@google-oss-prow
google-oss-prow Bot requested review from alyssacgoins and hbelmiro and a balanced review from Copilot August 5, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@google-oss-prow

Copy link
Copy Markdown

Hi @praneshnikhar. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@hbelmiro

hbelmiro commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

/ok-to-test

@hbelmiro

hbelmiro commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

/retest

@github-actions github-actions Bot added the ci-passed All CI tests on a pull request have passed label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-passed All CI tests on a pull request have passed ok-to-test size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants