Skip to content

fix(utils): ensure webdriver timeout compatibility with urllib3 2.x - #34440

Merged
eschutho merged 4 commits into
masterfrom
elizabeth/urllib-compat
Sep 5, 2025
Merged

fix(utils): ensure webdriver timeout compatibility with urllib3 2.x#34440
eschutho merged 4 commits into
masterfrom
elizabeth/urllib-compat

Conversation

@eschutho

@eschutho eschutho commented Aug 1, 2025

Copy link
Copy Markdown
Member

SUMMARY

This PR fixes compatibility issues with urllib3 2.x in the webdriver utility by ensuring timeout values are properly converted to float types. The urllib3 library now requires strict type checking for timeout parameters, and string/invalid timeout values were causing failures.
The changes include:

  • Convert all timeout-related configuration values to float type
  • Handle None, "None", and "null" string values appropriately
  • Add validation and logging for invalid timeout values
  • Refactor the create method to reduce complexity (addressing ruff C901 error)

TESTING INSTRUCTIONS

  1. Configure Superset with webdriver timeout settings in your configuration:
WEBDRIVER_CONFIGURATION = {

"timeout": "30",

"connect_timeout": "10.5",

"socket_timeout": 20,

"read_timeout": "15.0",

}
  1. Run screenshot/thumbnail generation tasks that use the webdriver
  2. Verify that timeout values are properly converted and no TypeError occurs
  3. Check logs for any warnings about invalid timeout values
    To run the new unit tests:
    bash

pytest tests/unit_tests/utils/webdriver_test.py -v

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

🤖 Generated with Claude Code

Co-Authored-By: Claude

@dosubot dosubot Bot added the change:backend Requires changing the backend label Aug 1, 2025

@korbit-ai korbit-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Functionality Over-permissive Timeout Key Matching ▹ view 🧠 Not in scope
Files scanned
File Path Reviewed
superset/utils/webdriver.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Comment on lines +288 to +287
for key, value in config.items():
if any(timeout_key in key.lower() for timeout_key in timeout_keys):

This comment was marked as resolved.

@sadpandajoe sadpandajoe added the AI 🤖 generated by AI label Aug 1, 2025
@eschutho
eschutho force-pushed the elizabeth/urllib-compat branch from 7a5040c to 2c0455e Compare August 1, 2025 19:48

@sadpandajoe sadpandajoe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eschutho
eschutho merged commit 385471c into master Sep 5, 2025
48 checks passed
@eschutho
eschutho deleted the elizabeth/urllib-compat branch September 5, 2025 23:25
Prasad-JB pushed a commit to Prasad-JB/superset that referenced this pull request Sep 8, 2025
sadpandajoe pushed a commit that referenced this pull request Dec 4, 2025
sadpandajoe pushed a commit that referenced this pull request Dec 4, 2025
sadpandajoe pushed a commit that referenced this pull request Dec 16, 2025
aminghadersohi pushed a commit to aminghadersohi/superset that referenced this pull request Jan 17, 2026
aminghadersohi pushed a commit to aminghadersohi/superset that referenced this pull request Jan 24, 2026
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI 🤖 generated by AI change:backend Requires changing the backend size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants