-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
feat: Add Parameters fields to GET Database #14653
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14653 +/- ##
==========================================
- Coverage 77.51% 77.30% -0.22%
==========================================
Files 958 958
Lines 48560 48598 +38
Branches 5703 5715 +12
==========================================
- Hits 37642 37568 -74
- Misses 10718 10829 +111
- Partials 200 201 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@pkdotson Ephemeral environment spinning up at http://54.188.67.191:8080. Credentials are |
@@ -81,10 +81,11 @@ describe('Add database', () => { | |||
cy.get('[data-test="modal-confirm-button"]:not(:disabled)').click(); | |||
|
|||
// should show error alerts | |||
cy.get('.toast').contains('error').should('be.visible'); | |||
// TODO(hugh): Update this test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a clubhouse ticket to re write this test once we are done with updating the modal
superset/databases/schemas.py
Outdated
if len(parameters.keys()) < 2: | ||
return data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
superset/db_engine_specs/base.py
Outdated
def build_sqlalchemy_url(cls, parameters: Any) -> str: | ||
raise NotImplementedError("build_sqlalchemy_url is not implemented") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was renamed to build_sqlalchemy_uri
:
sqlalchemy_uri = engine_spec.build_sqlalchemy_uri( |
def build_sqlalchemy_url(cls, parameters: Any) -> str: | |
raise NotImplementedError("build_sqlalchemy_url is not implemented") | |
def build_sqlalchemy_uri(cls, parameters: Any) -> str: | |
raise NotImplementedError("build_sqlalchemy_uri is not implemented") |
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
@@ -236,6 +237,18 @@ def backend(self) -> str: | |||
sqlalchemy_url = make_url(self.sqlalchemy_uri_decrypted) | |||
return sqlalchemy_url.get_backend_name() # pylint: disable=no-member | |||
|
|||
@property | |||
def parameters(self) -> Dict[str, Any]: | |||
# Build parameters if db_engine_spec is a subclass of BasicParametersMixin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
# Build parameters if db_engine_spec is a subclass of BasicParametersMixin | |
# Build parameters if db_engine_spec supports it |
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
Update the api to surface parameters in GET
database
. This will be leveraged for whenever a user wants to edit a database assuming configuration type is dynamic.Also, updated all engine specs to allow for abstract classes while we implement them.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION