-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix(ssh-tunnel): fix dataset creation flow through modal for DB with tunnel #22581
Conversation
Codecov Report
@@ Coverage Diff @@
## master #22581 +/- ##
==========================================
+ Coverage 67.00% 67.02% +0.01%
==========================================
Files 1859 1859
Lines 71036 71037 +1
Branches 7766 7766
==========================================
+ Hits 47597 47609 +12
+ Misses 21417 21406 -11
Partials 2022 2022
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
@hughhhh I think we should try to avoid this intrusive coding style, this context function has modified too much logic, you should redesign this function.
why do you think it's intrusive? This pattern is the cleanest way for us to support ssh tunnel in my opinion since we have to build the tunnel within context for any request to query the db |
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!
autoload=True, | ||
autoload_with=self._get_sqla_engine(), | ||
) | ||
with self.get_sqla_engine_with_context() as engine: |
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.
Is there a way to test this?
…dataset-modal-ssh-tunnel
0c81d5d
to
26cf408
Compare
…dataset-modal-ssh-tunnel
🏷️ preset:2023.01 |
…tunnel (apache#22581) (cherry picked from commit d18c7d6)
SUMMARY
DB's with tunnels are failing to create datasets, put in a fix to use context manager whenever checking on physical tables.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION