Skip to content

fix: add retry logic for WebSocket connection to SQL session#65

Merged
sfishel18 merged 1 commit intomainfrom
simon/ws-connect-retry
Apr 21, 2026
Merged

fix: add retry logic for WebSocket connection to SQL session#65
sfishel18 merged 1 commit intomainfrom
simon/ws-connect-retry

Conversation

@sfishel18
Copy link
Copy Markdown
Contributor

Summary

  • Adds tenacity-based retry with exponential backoff (up to 5 attempts) to the initial WebSocket connection in connect_direct()
  • Retries on transient connection errors (ConnectionRefusedError, TimeoutError, OSError, InvalidHandshake)
  • Bumps version to 0.26.1

Fixes intermittent failures in the SQL session canary tests caused by transient connection errors during the WebSocket handshake.

@sfishel18
Copy link
Copy Markdown
Contributor Author

@salty-hambot roast me

Copy link
Copy Markdown

@salty-hambot salty-hambot Bot left a comment

Choose a reason for hiding this comment

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

Reviewed by Salty Hambot 🤖🧂

Retry logic works but casts too wide a net — OSError will happily retry permission denied errors and DNS failures, and the SSL setup is needlessly re-executed (and mis-caught) on each attempt.

2 finding(s) posted.
💬 To request a re-review, comment @salty-hambot review

Comment thread wherobots/db/driver.py Outdated
Comment thread wherobots/db/driver.py
Adds tenacity-based retry with exponential backoff to the initial
WebSocket connection in connect_direct(). This fixes intermittent
failures in the SQL session canary tests caused by transient
connection errors during the WebSocket handshake.

Bump version to 0.26.1.
@sfishel18 sfishel18 force-pushed the simon/ws-connect-retry branch from 0bc3d49 to 89929dc Compare April 20, 2026 22:18
@sfishel18
Copy link
Copy Markdown
Contributor Author

@salty-hambot roast me

@sfishel18 sfishel18 marked this pull request as ready for review April 20, 2026 22:24
@sfishel18 sfishel18 requested a review from a team as a code owner April 20, 2026 22:24
@sfishel18 sfishel18 requested review from ClayMav and removed request for a team April 20, 2026 22:24
@sfishel18 sfishel18 merged commit 8630494 into main Apr 21, 2026
7 checks passed
@sfishel18 sfishel18 deleted the simon/ws-connect-retry branch April 21, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants