You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6e7ab0d
Browse filesBrowse the repository at this point in the historyBrowse files
test(retry): cover the Retry-After wiring, and scope the transport claim
Three review points from #75.
Nothing exercised the path that carries `Retry-After` off a classified
error and into the sleep. `_retry_delay` was tested directly, and the
retry-loop tests stub sleep with a lambda that discards its argument, so
a regression passing `None` there — or swapping the two positional args
— would have left every test green. Refuse a load the way the API
refuses a contended table, record what sleep actually received, and
assert the waits floor on the header. That also covers classify →
transient → retry end to end, which was only covered per-piece, and the
no-header case, so the floor is visibly the header's contribution rather
than a hard-coded one.
Also pin that a `CONFLICT` surfaces on the first attempt, which is the
half of the 409 split that had no loop-level test.
The README and `test_retry_policy`'s module docstring both stated "a
load is not idempotent" without qualification. That remains true of the
transport, which sees a method and a status and cannot know what it
would be replaying — but unscoped it reads as repo-wide and contradicts
the call-layer retry. Both now say which layer they mean.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Runtime boundary and guarantees are defined in `CONTRACT.md`.
10
10
11
11
-**Environment-driven client setup** — create clients from `HOTDATA_API_KEY`, optional `HOTDATA_API_URL`, and `HOTDATA_WORKSPACE`.
12
12
-**Workspace resolution** — choose an explicit workspace from env, otherwise discover workspaces and select the active workspace or first available workspace.
13
-
-**HTTP resilience** — retry SQL execution on stale pooled sockets. Transport-level retries are the SDK's own default, which this package leaves in place so a non-idempotent request is never replayed on a response status.
13
+
-**HTTP resilience** — retry SQL execution on stale pooled sockets. Transport-level retries are the SDK's own default, which this package leaves in place so a request is never blindly replayed on a response status. That is a claim about the transport, which cannot know what it would be replaying. `ManagedDatabaseClient` retries at the call layer, which can: a managed load is safe to re-send because it carries the same `upload_id` and the API replays its receipt for that id rather than applying the load twice.
14
14
-**SQL execution helper** — run SQL through `POST /v1/query`, poll async query runs when needed, and return a `QueryResult`.
15
15
-**Result utilities** — convert query results to records, pandas DataFrames, or metadata dictionaries for adapter display layers.
16
16
-**History helpers** — list recent results and query run history with normalized dataclasses.
0 commit comments