Skip to content

python(fix): fixed grpc connection errors with missing scheme#485

Merged
wei-qlu merged 4 commits intomainfrom
python/automatic-url-sheme-handling
Mar 3, 2026
Merged

python(fix): fixed grpc connection errors with missing scheme#485
wei-qlu merged 4 commits intomainfrom
python/automatic-url-sheme-handling

Conversation

@wei-qlu
Copy link
Contributor

@wei-qlu wei-qlu commented Feb 26, 2026

Users who provided a url without a protocol (grpc.sift.com) instead of a full URL (https://grpc.sift.com) would get a RuntimeError: [GrpcConnectError]: failed to connect to Sift error without a detailed explanation as of why. This PR fixes that by automatically prepending https:// (or http:// when use_ssl=False) to the URL so the connection works regardless of whether the user includes it.

Unit tests were added covering all cases for both GrpcConfig and RestConfig (bare URLs with and without SSL, and URLs that already include the protocol). Manual testing confirmed the client connects successfully with a bare URL.

image image

@wei-qlu wei-qlu marked this pull request as draft February 26, 2026 22:40
@wei-qlu wei-qlu marked this pull request as ready for review February 26, 2026 23:14
@wei-qlu wei-qlu assigned wei-qlu and unassigned wei-qlu Feb 26, 2026
@solidiquis solidiquis requested a review from tsift March 2, 2026 16:58
@wei-qlu wei-qlu requested a review from solidiquis March 3, 2026 00:09
@wei-qlu wei-qlu requested a review from tsift March 3, 2026 00:24
@wei-qlu wei-qlu enabled auto-merge (squash) March 3, 2026 18:43
@wei-qlu wei-qlu merged commit 42456ca into main Mar 3, 2026
15 checks passed
@wei-qlu wei-qlu deleted the python/automatic-url-sheme-handling branch March 3, 2026 18:44
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.

3 participants