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

chore(connector): Deprecate connectors.base #22594

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented Jan 5, 2023

SUMMARY

I was running into CI issues in #22413 which I suspect maybe related to the fact that the base datasources/columns/metrics which might not adhere to the SQLAlchemy relationship model, i.e., BaseDatasource.columns/BaseDatasource.metrics are defined as Python lists as opposed to a SQLAlchemy.orm.relationship.

Somewhat of a Yak Shaving experience, this PR simply deprecates the abstract classes—BaseDatasource, BaseColumn, and BaseMetric—which are no longer needed given that we no longer support the native Druid connector. Note this refactor effort is far from complete—there remains endless spaghetti code which uses a datasource type mapping—but hopefully it's a step (albeit small) in the right direction.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

@john-bodley john-bodley force-pushed the john-bodley--deprecate-connectors-base branch from 9b78ac2 to 00916e3 Compare January 5, 2023 00:13
@@ -27,9 +27,6 @@
from superset.models.slice import Slice
from superset.utils.core import get_user_id

if TYPE_CHECKING:
from superset.connectors.base.models import BaseDatasource
Copy link
Member Author

Choose a reason for hiding this comment

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

This was never used. I'm surprised Pylint didn't recognize it, but maybe it's not well versed with the TYPE_CHECKING construct and thus it felt it was used.

@john-bodley john-bodley marked this pull request as ready for review January 5, 2023 00:24
@john-bodley john-bodley force-pushed the john-bodley--deprecate-connectors-base branch 2 times, most recently from 4680ca2 to 83e6043 Compare January 5, 2023 00:34
@john-bodley john-bodley force-pushed the john-bodley--deprecate-connectors-base branch from 83e6043 to b58ceab Compare January 5, 2023 00:57
@john-bodley john-bodley closed this Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant