-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Migrating reports to AuthWebdriverProxy #10567
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10567 +/- ##
==========================================
- Coverage 63.97% 59.71% -4.26%
==========================================
Files 768 770 +2
Lines 36357 36368 +11
Branches 3431 3431
==========================================
- Hits 23259 21718 -1541
- Misses 12985 14458 +1473
- Partials 113 192 +79
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…-webdrivers # Conflicts: # superset/tasks/slack_util.py
@@ -0,0 +1,190 @@ | |||
# Licensed to the Apache Software Foundation (ASF) under one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving all things webdriver into a central location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but tests need changes
…-webdrivers # Conflicts: # superset/tasks/schedules.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good. A blocker on non related run.sh
. And a couple nice to haves/check it if works
scripts/tests/run.sh
Outdated
} | ||
|
||
# | ||
# Init global vars | ||
# | ||
DB_NAME="test" | ||
DB_NAME="superset" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct, the intend here is to use a separate DB and having a simple way to DROP/CREATE it at will
superset/utils/webdriver.py
Outdated
def auth(self, user: "User") -> WebDriver: | ||
driver = self.create() | ||
# Setting cookies requires doing a request first | ||
driver.get(headless_url("/login/")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this from here and place it inside machine_auth_provider_factory.instance.authenticate_webdriver(driver, user)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we have a couple of breaking changes here, so let's update UPDATING.md. Check if we need to update docs also.
@bkyryliuk I think your review would be very useful here
* Migrating reports to AuthWebdriverProxy * Extracting out webdriver proxy / Adding thumbnail tests to CI * Adding license * Adding license again * Empty commit * Adding thumbnail tests to CI * Switching thumbnail test to Postgres * Linting * Adding mypy:ignore / removing thumbnail tests from CI * Putting ignore statement back * Updating docs * First cut at authprovider * First cut at authprovider mostly working - still needs more tests * Auth provider tests added * Linting * Linting again... * Linting again... * Busting CI cache * Reverting workflow change * Fixing dataclasses * Reverting back to master * linting? * Reverting installation.rst * Reverting package-lock.json * Addressing feedback * Blacking * Lazy logging strings * UPDATING.md note
* Migrating reports to AuthWebdriverProxy * Extracting out webdriver proxy / Adding thumbnail tests to CI * Adding license * Adding license again * Empty commit * Adding thumbnail tests to CI * Switching thumbnail test to Postgres * Linting * Adding mypy:ignore / removing thumbnail tests from CI * Putting ignore statement back * Updating docs * First cut at authprovider * First cut at authprovider mostly working - still needs more tests * Auth provider tests added * Linting * Linting again... * Linting again... * Busting CI cache * Reverting workflow change * Fixing dataclasses * Reverting back to master * linting? * Reverting installation.rst * Reverting package-lock.json * Addressing feedback * Blacking * Lazy logging strings * UPDATING.md note
SUMMARY
This PR merges the functionality found in the reports scheduling Webdriver creation with the logic found in Thumbnails. The Thumbnails version allows for option overriding where necessary and is in general superior to that found in scheduling.
get_auth_cookies(User)
method viaMACHINE_AUTH_PROVIDER_CLASS
config option