literally just 2 int() casts for various cases where timeout and idp_response_timeout are read in as strings, but should be integers
Motivation and Context
Since sqlalchemy (and other packages) force url parameters to be passed as strings to redshift_connector, we can run into basic and avoidable issues from this package when connecting to Redshift via SQLAlchemy via the BrowserAzureOAuth2CredentialsProvider method.
Testing
Built package, connected, fixed the bug.
Screenshots (if appropriate)
code to reproduce:
from sqlalchemy import create_engine
engine = create_engine(
"redshift+redshift_connector://{HOST}:5439/{DATABASE}credentials_provider=BrowserAzureOAuth2CredentialsProvider&client_id={CLIENT}&idp_tenant={IDP_TENANT}&scope={SCOPE}/jdbc_login&idp_response_timeout=500&timeout=900000"
)
with engine.connect() as conn:
result = conn.execute("SELECT 1")
print(result.fetchone())
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
Checklist
[x] Local run of ./build.sh succeeds
[ ] Code changes have been run against the repository's pre-commit hooks
Description
literally just 2
int()
casts for various cases wheretimeout
andidp_response_timeout
are read in as strings, but should be integersMotivation and Context
Since sqlalchemy (and other packages) force url parameters to be passed as strings to redshift_connector, we can run into basic and avoidable issues from this package when connecting to Redshift via SQLAlchemy via the
BrowserAzureOAuth2CredentialsProvider
method.Testing
Built package, connected, fixed the bug.
Screenshots (if appropriate)
code to reproduce:
Types of changes
Checklist
./build.sh
succeedspytest test/unit
and they are passing.