You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2023/01/03 21:16:55 UTC

[GitHub] [superset] Antonio-RiveroMartnez opened a new pull request, #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Antonio-RiveroMartnez opened a new pull request, #22513:
URL: https://github.com/apache/superset/pull/22513

   ### SUMMARY
   Add our a new `SSHTunnelForm` component that will be used to set tunnels for our Databases, right now only works when using SQLAlchemy URIs.
   
   Work in progress: Include tests for the new component.
   
   Note: This PR includes all the changes from the API PR: https://github.com/apache/superset/pull/22199
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [X] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] hughhhh commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
hughhhh commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1065109692


##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -1428,7 +1486,36 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
                 conf={conf}
                 testConnection={testConnection}
                 testInProgress={testInProgress}
-              />
+              >
+                <SSHTunnelForm

Review Comment:
   @yousoph do we want to show the ssh tunnel switch even though tunneling is turned off?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] hughhhh commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
hughhhh commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1065105859


##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -1428,7 +1486,36 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
                 conf={conf}
                 testConnection={testConnection}
                 testInProgress={testInProgress}
-              />
+              >
+                <SSHTunnelForm

Review Comment:
   wrap this with the feature flag



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Antonio-RiveroMartnez commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1065108055


##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -1428,7 +1486,36 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
                 conf={conf}
                 testConnection={testConnection}
                 testInProgress={testInProgress}
-              />
+              >
+                <SSHTunnelForm

Review Comment:
   Sure, but that means, no feature flag no swicth will display, is that the wanted behavior? Right now, no feature flag the switch renders but you cannot turn it on (which might help raise awareness about the new feature? like, HEY! You might be able to set up a tunnel, but....) 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Antonio-RiveroMartnez commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1062911708


##########
superset/databases/ssh_tunnel/dao.py:
##########
@@ -24,3 +26,27 @@
 
 class SSHTunnelDAO(BaseDAO):
     model_cls = SSHTunnel
+
+    @classmethod
+    def update(
+        cls,
+        model: SSHTunnel,
+        properties: Dict[str, Any],
+        commit: bool = True,
+    ) -> SSHTunnel:
+        """
+        Unmask ``password``, ``private_key`` and ``private_key_password`` before updating.
+
+        When a database is edited the user sees a masked version of
+        the aforementioned fields.
+
+        The masked values should be unmasked before the ssh tunnel is updated.
+        """
+        if properties.get("password") == PASSWORD_MASK:
+            properties["password"] = model.password

Review Comment:
   The response of the GET already has the masked password thus it's stored in the reducer, so when calling the API to update let's say the `server_port`, we send the whole `ssh_tunnel` object, not just updated properties. Because of that, the API would assume you're trying to update the password when you were not. Pretty much like we are doing for other masked values in our forms.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Antonio-RiveroMartnez commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1066934069


##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/index.tsx:
##########
@@ -73,6 +73,7 @@ export interface FieldPropTypes {
     onRemoveTableCatalog: (idx: number) => void;

Review Comment:
   Oh! Ok, yeah, IIRC there a `engine_information` property we are getting in the UI with the `supports_file_upload`, so we might need to include this one there and use it. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Antonio-RiveroMartnez closed pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
Antonio-RiveroMartnez closed pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI
URL: https://github.com/apache/superset/pull/22513


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #22513:
URL: https://github.com/apache/superset/pull/22513#issuecomment-1363197705

   # [Codecov](https://codecov.io/gh/apache/superset/pull/22513?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#22513](https://codecov.io/gh/apache/superset/pull/22513?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (74759c3) into [create-sshtunnelconfig-tbl](https://codecov.io/gh/apache/superset/commit/607c68289ae2e07f297319a50daa32aead4d0b38?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (607c682) will **decrease** coverage by `11.28%`.
   > The diff coverage is `43.65%`.
   
   > :exclamation: Current head 74759c3 differs from pull request most recent head 9da6987. Consider uploading reports for the commit 9da6987 to get more accurate results
   
   ```diff
   @@                       Coverage Diff                       @@
   ##           create-sshtunnelconfig-tbl   #22513       +/-   ##
   ===============================================================
   - Coverage                       66.96%   55.67%   -11.29%     
   ===============================================================
     Files                            1853     1853               
     Lines                           70534    70632       +98     
     Branches                         7689     7689               
   ===============================================================
   - Hits                            47230    39324     -7906     
   - Misses                          21310    29314     +8004     
     Partials                         1994     1994               
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `52.53% <26.16%> (-0.09%)` | :arrow_down: |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `?` | |
   | python | `57.71% <43.92%> (-23.64%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `51.13% <43.92%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/22513?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ase/DatabaseModal/DatabaseConnectionForm/index.tsx](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL0RhdGFiYXNlQ29ubmVjdGlvbkZvcm0vaW5kZXgudHN4) | `90.90% <ø> (ø)` | |
   | [...RUD/data/database/DatabaseModal/SqlAlchemyForm.tsx](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL1NxbEFsY2hlbXlGb3JtLnRzeA==) | `61.53% <ø> (ø)` | |
   | [superset/constants.py](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29uc3RhbnRzLnB5) | `100.00% <ø> (ø)` | |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `60.60% <18.18%> (-25.61%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `24.13% <20.00%> (-55.87%)` | :arrow_down: |
   | [superset/databases/ssh\_tunnel/models.py](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NzaF90dW5uZWwvbW9kZWxzLnB5) | `74.19% <33.33%> (-25.81%)` | :arrow_down: |
   | [...c/views/CRUD/data/database/DatabaseModal/index.tsx](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL2luZGV4LnRzeA==) | `41.99% <42.10%> (ø)` | |
   | [superset/databases/api.py](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2FwaS5weQ==) | `51.76% <48.88%> (-41.78%)` | :arrow_down: |
   | [superset/databases/ssh\_tunnel/dao.py](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NzaF90dW5uZWwvZGFvLnB5) | `82.35% <72.72%> (-17.65%)` | :arrow_down: |
   | [superset/databases/ssh\_tunnel/commands/create.py](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NzaF90dW5uZWwvY29tbWFuZHMvY3JlYXRlLnB5) | `87.75% <85.71%> (-0.89%)` | :arrow_down: |
   | ... and [297 more](https://codecov.io/gh/apache/superset/pull/22513/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Antonio-RiveroMartnez commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1062911708


##########
superset/databases/ssh_tunnel/dao.py:
##########
@@ -24,3 +26,27 @@
 
 class SSHTunnelDAO(BaseDAO):
     model_cls = SSHTunnel
+
+    @classmethod
+    def update(
+        cls,
+        model: SSHTunnel,
+        properties: Dict[str, Any],
+        commit: bool = True,
+    ) -> SSHTunnel:
+        """
+        Unmask ``password``, ``private_key`` and ``private_key_password`` before updating.
+
+        When a database is edited the user sees a masked version of
+        the aforementioned fields.
+
+        The masked values should be unmasked before the ssh tunnel is updated.
+        """
+        if properties.get("password") == PASSWORD_MASK:
+            properties["password"] = model.password

Review Comment:
   Yup, our API supports PATCH updates, however, the response of the GET already has the masked password thus it's stored in the reducer, so when calling the API to update let's say the `server_port`, we send the whole `ssh_tunnel` object, not just updated properties. Because of that, the API would assume you're trying to update the password when you were not. Pretty much like we are doing for other masked values in our forms.



##########
superset/databases/ssh_tunnel/dao.py:
##########
@@ -24,3 +26,27 @@
 
 class SSHTunnelDAO(BaseDAO):
     model_cls = SSHTunnel
+
+    @classmethod
+    def update(
+        cls,
+        model: SSHTunnel,
+        properties: Dict[str, Any],
+        commit: bool = True,
+    ) -> SSHTunnel:
+        """
+        Unmask ``password``, ``private_key`` and ``private_key_password`` before updating.
+
+        When a database is edited the user sees a masked version of
+        the aforementioned fields.
+
+        The masked values should be unmasked before the ssh tunnel is updated.
+        """
+        if properties.get("password") == PASSWORD_MASK:
+            properties["password"] = model.password

Review Comment:
   Yup, our API supports PATCH kind of updates, however, the response of the GET already has the masked password thus it's stored in the reducer, so when calling the API to update let's say the `server_port`, we send the whole `ssh_tunnel` object, not just updated properties. Because of that, the API would assume you're trying to update the password when you were not. Pretty much like we are doing for other masked values in our forms.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Antonio-RiveroMartnez closed pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
Antonio-RiveroMartnez closed pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI
URL: https://github.com/apache/superset/pull/22513


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] hughhhh commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
hughhhh commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1062906759


##########
superset/databases/ssh_tunnel/dao.py:
##########
@@ -24,3 +26,27 @@
 
 class SSHTunnelDAO(BaseDAO):
     model_cls = SSHTunnel
+
+    @classmethod
+    def update(
+        cls,
+        model: SSHTunnel,
+        properties: Dict[str, Any],
+        commit: bool = True,
+    ) -> SSHTunnel:
+        """
+        Unmask ``password``, ``private_key`` and ``private_key_password`` before updating.
+
+        When a database is edited the user sees a masked version of
+        the aforementioned fields.
+
+        The masked values should be unmasked before the ssh tunnel is updated.
+        """
+        if properties.get("password") == PASSWORD_MASK:
+            properties["password"] = model.password

Review Comment:
   we should move this logic to the frontend, basically if the field hasn't been updated we shouldn't send it in the payload



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] hughhhh merged pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
hughhhh merged PR #22513:
URL: https://github.com/apache/superset/pull/22513


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Antonio-RiveroMartnez commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1065108055


##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -1428,7 +1486,36 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
                 conf={conf}
                 testConnection={testConnection}
                 testInProgress={testInProgress}
-              />
+              >
+                <SSHTunnelForm

Review Comment:
   Sure, but that means, no feature flag no swicth will display, is that the wanted behavior? Right now, no feature flag the switch renders but you cannot turn it on.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] hughhhh commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
hughhhh commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1065109692


##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -1428,7 +1486,36 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
                 conf={conf}
                 testConnection={testConnection}
                 testInProgress={testInProgress}
-              />
+              >
+                <SSHTunnelForm

Review Comment:
   @yousoph do we want to show the ssh tunnel switch even though tunneling is turned off? I was under the impression we'd hide the flag completely since the user won't able to do anything



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] hughhhh commented on a diff in pull request #22513: feat(ssh_tunnel): SQLAlchemy Form UI

Posted by GitBox <gi...@apache.org>.
hughhhh commented on code in PR #22513:
URL: https://github.com/apache/superset/pull/22513#discussion_r1066444025


##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/index.tsx:
##########
@@ -73,6 +73,7 @@ export interface FieldPropTypes {
     onRemoveTableCatalog: (idx: number) => void;

Review Comment:
   also we need to check the available endpoint to see if a given engine allows ssh tunneling
   https://github.com/apache/superset/blob/master/superset/db_engine_specs/base.py#L196



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org