You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "aminghadersohi (via GitHub)" <gi...@apache.org> on 2026/02/20 20:31:58 UTC

[PR] fix(screenshots): downgrade screenshot timeout logs from ERROR to WARNING [superset]

aminghadersohi opened a new pull request, #38130:
URL: https://github.com/apache/superset/pull/38130

   ### SUMMARY
   
   Selenium timeout exceptions during screenshot generation are expected operational behavior (slow-loading dashboards, network latency, etc.) and not actual server errors. These were being logged at ERROR level via `logger.exception()`, creating significant noise in log aggregators like Datadog.
   
   **Changes:**
   - `webdriver.py`: Change `logger.exception()` to `logger.warning(..., exc_info=True)` for all three timeout scenarios (page load, dashboard draw, chart load)
   - `webdriver.py`: Fix bare `except:` clause to use `except Exception:`
   - `webdriver.py`: Reorder outer except blocks so specific exceptions (`TimeoutException`, `StaleElementReferenceException`, `WebDriverException`) are caught before the generic `Exception` handler — previously these were unreachable dead code
   - `dashboards/api.py`: Downgrade `logger.error()` to `logger.warning()` in the thumbnail endpoint's catch-all handler that returns 404 (inconsistent to log ERROR for a 404 response)
   
   ### BEFORE/AFTER SCREENSHOTS OR COVERAGE URL
   N/A - logging level changes only, no UI impact.
   
   ### TESTING INSTRUCTIONS
   1. Trigger a dashboard thumbnail generation for a dashboard that takes a long time to load
   2. Check that selenium timeout messages are logged at WARNING level instead of ERROR
   3. Verify that the `ScreenshotImageNotAvailableException` still returns 404 properly
   4. Unit tests: `pytest tests/unit_tests/utils/webdriver_test.py` (16/17 pass - the 1 failure is pre-existing in Playwright test, unrelated to these changes)
   
   ### ADDITIONAL INFORMATION
   - These changes directly address Datadog `[remove]` exclusion filters for selenium timeout errors
   - The outer except block reordering fixes a bug where `except Exception` caught everything before the more specific handlers, making them dead code
   - `logger.warning(..., exc_info=True)` preserves the full stack trace for debugging while correctly classifying the severity
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(screenshots): downgrade screenshot timeout logs from ERROR to WARNING [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38130:
URL: https://github.com/apache/superset/pull/38130#issuecomment-3937024350

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(screenshots): downgrade screenshot timeout logs from ERROR to WARNING [superset]

Posted by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org>.
Antonio-RiveroMartnez merged PR #38130:
URL: https://github.com/apache/superset/pull/38130


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(screenshots): downgrade screenshot timeout logs from ERROR to WARNING [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #38130:
URL: https://github.com/apache/superset/pull/38130#issuecomment-3937450052

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/38130?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `0%` with `10 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 65.87%. Comparing base ([`6fdaa8e`](https://app.codecov.io/gh/apache/superset/commit/6fdaa8e9b36cf5838d3d0d20a52ab492c0cfa06b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8f51f1b`](https://app.codecov.io/gh/apache/superset/commit/8f51f1b311018bd10310dbcafcb84de2bf9ab8a6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 6 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/38130?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [superset/utils/webdriver.py](https://app.codecov.io/gh/apache/superset/pull/38130?src=pr&el=tree&filepath=superset%2Futils%2Fwebdriver.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdXRpbHMvd2ViZHJpdmVyLnB5) | 0.00% | [9 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/38130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [superset/dashboards/api.py](https://app.codecov.io/gh/apache/superset/pull/38130?src=pr&el=tree&filepath=superset%2Fdashboards%2Fapi.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/38130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #38130       +/-   ##
   ===========================================
   + Coverage        0   65.87%   +65.87%     
   ===========================================
     Files           0      670      +670     
     Lines           0    51441    +51441     
     Branches        0     5803     +5803     
   ===========================================
   + Hits            0    33889    +33889     
   - Misses          0    16148    +16148     
   - Partials        0     1404     +1404     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/38130/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/38130/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.42% <0.00%> (?)` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/38130/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.44% <0.00%> (?)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/38130/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.86% <0.00%> (?)` | |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/38130/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `64.21% <0.00%> (?)` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/38130/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/38130?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org