-
Notifications
You must be signed in to change notification settings - Fork 370
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
[computes] fixed session-type extraction for connectors #3724
base: master
Are you sure you want to change the base?
Conversation
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, possible to add a unit test?
b3ceb92
to
3eff591
Compare
@@ -44,6 +42,9 @@ | |||
from notebook.connectors.base import Api, QueryError, QueryExpired, OperationTimeout, OperationNotSupported, _get_snippet_name, Notebook, \ | |||
get_interpreter, patch_snippet_for_connector | |||
|
|||
from future import standard_library | |||
standard_library.install_aliases() |
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 these lines?
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.
@agl29 I have not removed it and nothing seem to have crashed this far. We have these install_aliases()
at several places in our code base. We need to see if we really need them anymore.
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.
I guess we don't need them, may be it was required for python2 based Hue.
The problem is that connector based query execution is not able to reuse session to fetch results. The frontend is sending the correct session_id but our session fetching logic got broken when the computes was implemented. we are now looking for the session_type from compute['name'] for computes, connector['name'] for connector and then snippets['type'] for old config file based hive/impala sessions. A related change is to make use of session for get_log and check_status calls if the frontend is sending it. Rest is some ruff and other refactoring.
f8b4602
to
f292cb3
Compare
The problem is that connector based query execution is not able to
reuse session to fetch results. The frontend is sending the correct
session_id but our session fetching logic got broken when the computes
was implemented. we are now looking for the session_type from
compute['name'] for computes, connector['name'] for connector and
then snippets['type'] for old config file based hive/impala sessions.
A related change is to make use of session for get_log and check_status
calls if the frontend is sending it.
Rest is some ruff and other refactoring.