Skip to content

Conversation

shubha-rajan
Copy link
Contributor

Description

Update sample to use pytds, a pure-python driver instead of pyodbc, so that it can work on Cloud Functions

Checklist

@shubha-rajan shubha-rajan requested a review from kurtisvg January 26, 2021 22:32
@shubha-rajan shubha-rajan requested a review from a team as a code owner January 26, 2021 22:32
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jan 26, 2021
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 26, 2021
Copy link
Contributor

@engelke engelke left a comment

Choose a reason for hiding this comment

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

LGTM once tests pass.

@@ -1,4 +1,5 @@
Flask==1.1.2
SQLAlchemy==1.3.22
pyodbc==4.0.30
python-tds==1.10.0
Copy link
Contributor

Choose a reason for hiding this comment

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

connection_test is still using pyodbc.

@shubha-rajan
Copy link
Contributor Author

shubha-rajan commented Jan 27, 2021

The tests are passing locally while running the proxy, but not on Kokoro. Getting this error.

sqlalchemy.exc.DBAPIError: (pytds.tds_base.Error) Client does not have encryption enabled but it is required by server, enable encryption and try connecting again
(Background on this error at: http://sqlalche.me/e/13/dbapi)

I'm in the process of debugging it. Any ideas why this error would show up here but not locally?

@kurtisvg
Copy link
Contributor

The tests are passing locally while running the proxy, but not on Kokoro. Getting this error.

sqlalchemy.exc.DBAPIError: (pytds.tds_base.Error) Client does not have encryption enabled but it is required by server, enable encryption and try connecting again
(Background on this error at: http://sqlalche.me/e/13/dbapi)

I'm in the process of debugging it. Any ideas why this error would show up here but not locally?

Are we using the same instance? Is it possible there is a "required SSL" bit that was flipped for overground?

@shubha-rajan
Copy link
Contributor Author

shubha-rajan commented Jan 27, 2021

Are we using the same instance? Is it possible there is a "required SSL" bit that was flipped for overground?

Different instance, but both are under the Google org so overground rules should be the same. The instance I'm using has private IP enabled, so that might be the difference.

Also, shouldn't using the proxy mean the connection to the server is SSL-encrypted? Is the issue that it expects encryption while connecting to the proxy server on the client side too?

@shubha-rajan shubha-rajan added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 27, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 27, 2021
@shubha-rajan shubha-rajan added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 27, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 27, 2021
@kurtisvg kurtisvg added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 30, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 30, 2021
@shubha-rajan shubha-rajan added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Feb 1, 2021
@shubha-rajan shubha-rajan added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Feb 22, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 22, 2021
@shubha-rajan shubha-rajan enabled auto-merge (squash) February 26, 2021 19:35
@shubha-rajan shubha-rajan merged commit efc51a4 into GoogleCloudPlatform:master Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants