fix: Correct data source error reporting#447
Open
jsonbailey wants to merge 1 commit into
Open
Conversation
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
cd755e8 to
a10aeee
Compare
keelerm84
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 uncalledtime.timefunction (instead oftime.time()) as the timestamp, so every unexpected polling error recorded a bogus non-numericDataSourceErrorInfo.time.datasourcev2/polling.py(cleanup, no behavior change) — useresponse.statusin the HTTP-error message instead of interpolating the wholeurllib3response 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