Skip to content

v0.8.3: Google device-flow DNS resilience#15

Merged
pretyflaco merged 1 commit into
mainfrom
google-device-start-retry
Jun 13, 2026
Merged

v0.8.3: Google device-flow DNS resilience#15
pretyflaco merged 1 commit into
mainfrom
google-device-start-retry

Conversation

@pretyflaco

Copy link
Copy Markdown
Owner

The vezir-android 0.6.1 on-device e2e hit a 502 "could not reach Google to start sign-in" on the first tap — the recurring muscle DNS flake on the device/code POST. device/poll's JWKS path got retry treatment in 0.8.1, but device/start and the token exchange did not.

Changes

  • _post_with_retry — retries a Google POST on transient network/DNS errors with backoff (reuses _is_transient_network_error); used by both device/start and the device/poll token exchange.
  • device/start — only a genuine network failure after retries returns 502.
  • device/poll — a DNS/network failure reaching Google's token endpoint now returns 202 authorization_pending (keep polling) instead of a hard 502, so a mid-flow blip doesn't abort sign-in.

Tests

  • device/start retries a transient DNS error then succeeds (200).
  • device/poll network error → 202.
  • Full suite: 687 passed. ruff + mypy clean.

Version 0.8.2 → 0.8.3.

The vezir-android 0.6.1 e2e hit a 502 "could not reach Google to start
sign-in" on the first tap — the muscle DNS flake on the device/code POST
(device/poll's JWKS path already got this treatment in 0.8.1, but
device/start and the token exchange did not).

- _post_with_retry: retries a Google POST on transient network/DNS errors
  with backoff (reuses _is_transient_network_error), used by both
  device/start and the device/poll token exchange.
- device/start: only a genuine network failure after retries returns 502.
- device/poll: a DNS/network failure reaching Google's token endpoint now
  returns 202 authorization_pending (keep polling) instead of a hard 502,
  so a mid-flow blip doesn't abort the sign-in.

Tests: device/start retries a transient DNS error then succeeds (200);
device/poll network error -> 202. Full suite 687 passed. ruff + mypy clean.
@pretyflaco pretyflaco merged commit 96bf50e into main Jun 13, 2026
5 checks passed
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.

1 participant