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

fix: move driver import to method #26066

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Conversation

giftig
Copy link
Contributor

@giftig giftig commented Nov 22, 2023

SUMMARY

Accidentally imported a trino driver type at module-level, which can cause problems for users who don't have the trino driver installed.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

Run superset without the trino driver installed.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2b88225) 69.09% compared to head (805e665) 69.09%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #26066   +/-   ##
=======================================
  Coverage   69.09%   69.09%           
=======================================
  Files        1940     1940           
  Lines       75867    75867           
  Branches     8444     8444           
=======================================
  Hits        52423    52423           
  Misses      21268    21268           
  Partials     2176     2176           
Flag Coverage Δ
hive 53.68% <0.00%> (-0.01%) ⬇️
mysql 78.16% <0.00%> (-0.01%) ⬇️
postgres 78.25% <0.00%> (-0.01%) ⬇️
presto 53.63% <0.00%> (-0.01%) ⬇️
python 82.95% <100.00%> (ø)
sqlite 76.91% <0.00%> (-0.01%) ⬇️
unit 55.79% <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.

Accidentally imported a trino driver type at module-level, which can
cause problems for users who don't have the trino driver installed.
@sfirke
Copy link
Member

sfirke commented Nov 22, 2023

I'll merge to fix the build - thanks for the prompt fix! - but can you explain the pylint comment to me for learning purposes?

@giftig
Copy link
Contributor Author

giftig commented Nov 22, 2023

@sfirke pylint lints our python code and looks for bad practices, code smell, etc. Generally it's best practice for imports to be at the top of the file, but as we've seen here, that doesn't always work out for our use case. The comment tells pylint to disregard this one.

@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Nov 22, 2023
@michael-s-molina michael-s-molina removed the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Dec 4, 2023
josedev-union pushed a commit to Ortege-xyz/studio that referenced this pull request Jan 22, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants