#5058·steampipe

tx.Rollback/tx.Commit errors are silently ignored in executeUpdateQuery/executeCommentQuery

Author: kaidaguerreCreated Sep 24, 2026Updated Sep 24, 2026

tx.Rollback/tx.Commit errors are silently ignored in executeUpdateQuery and executeCommentQuery.

Where: pkg/connection/refresh_connections_state.go, executeUpdateQuery and executeCommentQuery (the deferred tx.Rollback(ctx) / tx.Commit(ctx) calls).

What happens today: both functions defer a rollback-or-commit based on whether the function is returning an error, and neither return value is checked. If Commit itself fails, the caller still proceeds as if the update succeeded (the update's own error is already nil at that point); if Rollback fails after a real error, that failure is silently swallowed too.

What a fix would change for users: a failed Commit after an apparently-successful update means connection state could be reported as up to date when it wasn't durably committed - surfacing that would change what RefreshConnections reports as success/failure for a connection.

What analysis is needed before fixing: this file is also touched by an in-flight PR (turbot/steampipe#5049, fix-installation-state-race-5038) which already adds _ = discards on these exact lines for lint-suppression purposes - a real fix (checking and propagating the error) should be coordinated with that PR rather than done independently, since a real fix would change executeUpdateQuery/executeCommentQuery's error-reporting behaviour, not just discard the return value.

Generated with Claude Code

https://claude.ai/code/session_01VGDYEHuq4iigxBKFBhJije