Skip to content

ref: Silence spurious google_auth_httplib2 per-request timeout warning (SNUBA-8P5)#8087

Open
phacops wants to merge 1 commit into
masterfrom
claude/stoic-galileo-4c2lid
Open

ref: Silence spurious google_auth_httplib2 per-request timeout warning (SNUBA-8P5)#8087
phacops wants to merge 1 commit into
masterfrom
claude/stoic-galileo-4c2lid

Conversation

@phacops

@phacops phacops commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Gets rid of Sentry issue SNUBA-8P5 — a warning-level log spamming snuba-admin (132k+ occurrences, 0 users impacted, super_low Seer actionability):

httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.

Root cause

The warning is emitted by google_auth_httplib2's Request.__call__, which logs unconditionally whenever a per-request timeout is passed:

if timeout is not None:
    _LOGGER.warning("httplib2 transport does not support per-request timeout. ...")

Since google-auth ≥ 2.39.0, the transport is always handed a per-request timeout — e.g. when refreshing service-account tokens against the GKE metadata server (snuba/admin/google.py builds the cloudidentity client and executes group-membership lookups on every admin request).

Crucially, the message fires regardless of how the httplib2.Http instance is constructed. Seer's suggestion ("pass a timeout-configured httplib2.Http to build()") does not silence it, and is already moot: googleapiclient's default build_http() constructs the Http with a construction-time timeout. There is no source-level fix on our side — the warning is pure noise we can't prevent google-auth from logging.

Fix

Drop everything below ERROR for the google_auth_httplib2 logger in setup_logging(). This:

setup_logging() is on the snuba-admin code path (snuba/admin/wsgi.py), which is where this warning originates, and on every other service path too.

Verification

Confirmed via a standalone check that a google_auth_httplib2 WARNING record is filtered at the logger level (never reaches any handler, including Sentry's LoggingIntegration handler), while ERROR still propagates.

🤖 Generated with Claude Code


Generated by Claude Code

google-auth's httplib2 transport logs a WARNING on every token refresh
("httplib2 transport does not support per-request timeout. Set the timeout
when constructing the httplib2.Http instance.") because google-auth >= 2.39.0
always hands the transport a per-request timeout (e.g. when refreshing
service-account tokens against the GKE metadata server). The warning fires
regardless of how the httplib2.Http instance is constructed -- googleapiclient
already builds it with a construction-time timeout -- so there is no source-level
fix on our side; the message is pure noise (132k+ events on snuba-admin, zero
user impact).

Drop everything below ERROR for the google_auth_httplib2 logger in
setup_logging() so the warning no longer becomes a Sentry issue or spams logs.

Fixes SNUBA-8P5

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FJBvBVj68XBb4iFvoBe9A4
@phacops phacops requested a review from a team as a code owner June 22, 2026 23:33
@phacops phacops enabled auto-merge (squash) June 23, 2026 00:35
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