fix: log rows.Close() errors instead of silently discarding them - #13982
fix: log rows.Close() errors instead of silently discarding them#13982praneshnikhar wants to merge 1 commit into
Conversation
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>
|
@praneshnikhar: The label(s) 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/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
|
/ok-to-test |
|
/retest |
Description
The
migrateCleanupUniqueIndexesfunction inclient_manager.goused_ = rows.Close()to suppress close errors fromsql.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 viaglog.Warningfso close failures are visible in logs without altering control flow.Change type
/kind bug
Changelog