Files
superset2/tests
Elizabeth Thompson cc6cf348c7 fix(datasets): log datetime format-detection DB query failures at WARNING (SC-115217)
DatetimeFormatDetector.detect_column_format() already handles any failure
during best-effort datetime format sampling by returning None -- format
detection has zero user-facing impact when skipped. It used a single
broad except Exception around the whole method body, so an expected,
already-handled failure while actually querying the target database
(bad connection config, transient outage, permission errors) was logged
via logger.exception() (ERROR + full traceback), which Sentry's logging
integration captures on every occurrence.

The specific trigger is a customer's misconfigured BigQuery connection
rejecting the sampling query with a 400 ("Cannot parse '' as CloudRegion"),
flooding Sentry ~90k times across 24 users since 2025-12 with a condition
that is fully recoverable and has no user impact.

Wrap only the database.get_df() call in its own try/except, logging at
WARNING instead -- matching the level already used for the sibling
"No data returned"/"Could not detect format" cases a few lines below.
The outer except Exception is unchanged, so genuine internal bugs (SQL
building, quoting, etc.) still log at ERROR and stay actionable.

Fixes SUPERSET-PYTHON-YDB

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-24 15:31:48 +00:00
..