Skip to content
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

[BUGFIX] Handle DatabricksSQL attribute error and update dependency #10424

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

Kilo59
Copy link
Contributor

@Kilo59 Kilo59 commented Sep 19, 2024

Depending on the version and extra depenencies the databricks package may not always have a .sqlalchemy sub-module.

This PR handles the potential AttributeError and bumps the minimum version of databricks-sql-connector

Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit d7f021e
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/66ec47f1a9a045000852fcef

@Kilo59 Kilo59 changed the title [BUGFIX] Handle DatabricksSQL attribute error [BUGFIX] Handle DatabricksSQL attribute error and update dependency Sep 19, 2024
@Kilo59 Kilo59 self-assigned this Sep 19, 2024
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.96%. Comparing base (5b2a969) to head (d7f021e).
Report is 2 commits behind head on develop.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #10424   +/-   ##
========================================
  Coverage    79.96%   79.96%           
========================================
  Files          459      459           
  Lines        39976    39976           
========================================
  Hits         31965    31965           
  Misses        8011     8011           
Flag Coverage Δ
3.10 66.73% <100.00%> (ø)
3.10 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds ?
3.10 aws_deps ?
3.10 big ?
3.10 filesystem ?
3.10 mssql ?
3.10 mysql ?
3.10 postgresql ?
3.10 spark_connect ?
3.10 trino ?
3.11 66.73% <100.00%> (+<0.01%) ⬆️
3.11 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds ?
3.11 aws_deps ?
3.11 big ?
3.11 filesystem ?
3.11 mssql ?
3.11 mysql ?
3.11 postgresql ?
3.11 spark_connect ?
3.11 trino ?
3.12 65.35% <100.00%> (+0.01%) ⬆️
3.12 aws_deps 45.88% <100.00%> (ø)
3.12 big 54.50% <100.00%> (ø)
3.12 filesystem 60.99% <100.00%> (ø)
3.12 mssql 49.97% <100.00%> (ø)
3.12 mysql 50.03% <100.00%> (ø)
3.12 postgresql 54.29% <100.00%> (ø)
3.12 spark 57.80% <100.00%> (ø)
3.12 spark_connect 46.17% <100.00%> (ø)
3.12 trino 52.42% <100.00%> (ø)
3.8 66.77% <100.00%> (ø)
3.8 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds 55.09% <100.00%> (ø)
3.8 aws_deps 45.91% <100.00%> (ø)
3.8 big 54.52% <100.00%> (ø)
3.8 databricks 47.60% <0.00%> (ø)
3.8 filesystem 61.00% <100.00%> (ø)
3.8 mssql 49.96% <100.00%> (ø)
3.8 mysql 50.02% <100.00%> (ø)
3.8 postgresql 54.27% <100.00%> (ø)
3.8 snowflake 48.46% <100.00%> (ø)
3.8 spark 57.77% <100.00%> (ø)
3.8 spark_connect 46.18% <100.00%> (ø)
3.8 trino 52.41% <100.00%> (ø)
3.9 66.75% <100.00%> (ø)
3.9 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds ?
3.9 aws_deps ?
3.9 big ?
3.9 filesystem ?
3.9 mssql ?
3.9 mysql ?
3.9 postgresql ?
3.9 spark_connect ?
3.9 trino ?
cloud 0.00% <0.00%> (ø)
docs-basic 52.43% <100.00%> (ø)
docs-creds-needed 52.71% <100.00%> (ø)
docs-spark 52.10% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Kilo59 Kilo59 requested a review from NathanFarmer September 19, 2024 15:51
Comment on lines +71 to 73
except (ImportError, AttributeError):
sqla_databricks = None # type: ignore[assignment]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this module should probably use our NotImported pattern. But I don't want to do that as part of this PR.

@Kilo59 Kilo59 enabled auto-merge September 19, 2024 15:54
@Kilo59 Kilo59 added the databricks-sql DatabricksSQL related label Sep 19, 2024
@Kilo59 Kilo59 added this pull request to the merge queue Sep 19, 2024
Merged via the queue into develop with commit f567c84 Sep 19, 2024
74 checks passed
@Kilo59 Kilo59 deleted the dbs-sql-attr-error branch September 19, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
databricks-sql DatabricksSQL related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants