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 2025/10/05 04:28:43 UTC
[PR] fix(webdriver): add missing options object to WebDriver initialization [superset]
aminghadersohi opened a new pull request, #35504:
URL: https://github.com/apache/superset/pull/35504
### SUMMARY
This PR fixes a critical bug in the Selenium WebDriver initialization where the `options` object was being configured but never actually passed to the WebDriver constructor.
**The Bug:**
In `superset/utils/webdriver.py`, the code was:
1. Creating an options object
2. Setting capabilities on it (`options.set_capability()`)
3. Setting preferences on it (`options.profile.set_preference()`)
4. But then **not passing it to the WebDriver**
This caused all custom WebDriver configurations (capabilities, preferences, browser settings) to be silently ignored, resulting in WebDriver instances running with default settings instead of the configured ones.
**The Fix:**
Added `"options": options,` to the kwargs dictionary that gets passed to the WebDriver initialization, ensuring the configured options are actually used.
This is a one-line fix that restores proper WebDriver configuration functionality.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable - this is an internal bug fix with no UI changes.
### TESTING INSTRUCTIONS
1. **Verify WebDriver options are respected:**
```bash
# Set custom WebDriver configuration in superset_config.py
WEBDRIVER_TYPE = "firefox"
WEBDRIVER_CONFIGURATION = {
"options": {
"capabilities": {
"acceptInsecureCerts": True
},
"preferences": {
"browser.download.folderList": 2
}
}
}
```
2. **Test screenshot/thumbnail generation:**
- Navigate to a dashboard
- Generate a thumbnail or screenshot
- Verify the WebDriver uses the configured options (check browser logs/behavior)
3. **Verify no regression:**
```bash
# Run WebDriver-related tests
pytest tests/integration_tests/reports/
pytest tests/integration_tests/thumbnails/
```
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] 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
**Notes:**
- This is a bug fix with no breaking changes
- Affects all Selenium WebDriver usage (screenshots, thumbnails, reports)
- The bug likely went unnoticed because default WebDriver settings work in most cases
- No database migration or feature flags required
--
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(webdriver): add missing options object to WebDriver initialization [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe merged PR #35504:
URL: https://github.com/apache/superset/pull/35504
--
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(webdriver): add missing options object to WebDriver initialization [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #35504:
URL: https://github.com/apache/superset/pull/35504#issuecomment-3368739423
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(webdriver): add missing options object to WebDriver initialization [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #35504:
URL: https://github.com/apache/superset/pull/35504#issuecomment-3368742582
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/35504?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 50.75%. Comparing base ([`77a5969`](https://app.codecov.io/gh/apache/superset/commit/77a5969dc1570d8ac3560520e05a4872e0248c37?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c92a99f`](https://app.codecov.io/gh/apache/superset/commit/c92a99f9c56c82d05e2516c02840ad54f0ded526?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 70 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #35504 +/- ##
===========================================
+ Coverage 0 50.75% +50.75%
===========================================
Files 0 589 +589
Lines 0 43572 +43572
Branches 0 4713 +4713
===========================================
+ Hits 0 22116 +22116
- Misses 0 20835 +20835
- Partials 0 621 +621
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/35504/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/35504/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `46.29% <ø> (?)` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/35504/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.00% <ø> (?)` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/35504/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.75% <ø> (?)` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/35504/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/35504?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