Skip to content

fix: Correct data source error reporting#447

Open
jsonbailey wants to merge 1 commit into
mainfrom
jb/sdk-2592/sync-fixes
Open

fix: Correct data source error reporting#447
jsonbailey wants to merge 1 commit into
mainfrom
jb/sdk-2592/sync-fixes

Conversation

@jsonbailey

@jsonbailey jsonbailey commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

A bug fix and a small cleanup in the synchronous data-source error path, found while building the async SDK (SDK-60) and extracted as an independent PR ahead of the async slices. Neither depends on async; this is the first PR of that stacked sequence.

  • datasource/polling.py (bug fix) — the UNKNOWN-error branch passed the uncalled time.time function (instead of time.time()) as the timestamp, so every unexpected polling error recorded a bogus non-numeric DataSourceErrorInfo.time.
  • datasourcev2/polling.py (cleanup, no behavior change) — use response.status in the HTTP-error message instead of interpolating the whole urllib3 response object. This string is currently unread on the HTTP-error path (consumers rebuild the message from the status code), so it's fixed for forward-cleanliness.

Testing

Full unit suite green (1012 passed, 0 failed); mypy + isort + pycodestyle clean.

SDK-2592

@jsonbailey jsonbailey requested a review from a team as a code owner June 24, 2026 15:11
Two pre-existing bugs in the sync data-source error reporting, independent of the async work:

- datasource/polling.py: pass time.time() (not the uncalled time.time) so the UNKNOWN-error
  DataSourceErrorInfo records a real timestamp.
- datasourcev2/polling.py: use response.status in the HTTP-error message instead of interpolating
  the urllib3 response object.

Also retargets the stale version-gated-upsert TODO in datasource/status.py to SDK-62 (the proper
fix needs a breaking upsert -> bool change, deferred to the next major version).

SDK-2592
@jsonbailey jsonbailey force-pushed the jb/sdk-2592/sync-fixes branch from cd755e8 to a10aeee Compare June 24, 2026 16:08
@jsonbailey jsonbailey changed the title fix: Correct data source error reporting and version-gated change events fix: Correct data source error reporting Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants