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 2022/12/01 19:43:58 UTC

[GitHub] [superset] Antonio-RiveroMartnez opened a new pull request, #22306: fix(ssh_tunnel): Address Base PR comments from peer review

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

   ### SUMMARY
   - Address code reviews comments:
   
   https://github.com/apache/superset/pull/21912#discussion_r1035416042 https://github.com/apache/superset/pull/21912#discussion_r1035410655 https://github.com/apache/superset/pull/21912#discussion_r1026958824 https://github.com/apache/superset/pull/21912#discussion_r1035415356 https://github.com/apache/superset/pull/21912#discussion_r1035558825
   
   ### 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:
   - [ ] 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] eschutho commented on a diff in pull request #22306: fix(ssh_tunnel): Address Base PR comments from peer review

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


##########
superset/databases/ssh_tunnel/models.py:
##########
@@ -41,15 +42,17 @@ class SSHTunnel(Model, AuditMixinNullable, ExtraJSONMixin, ImportExportMixin):
     __tablename__ = "ssh_tunnels"
 
     id = sa.Column(sa.Integer, primary_key=True)
-    database_id = sa.Column(sa.Integer, sa.ForeignKey("dbs.id"), nullable=False)
+    database_id = sa.Column(
+        sa.Integer, sa.ForeignKey("dbs.id"), nullable=False, unique=True
+    )
     database: Database = relationship(
         "Database",
         backref=backref("ssh_tunnels", cascade="all, delete-orphan"),
         foreign_keys=[database_id],
     )
 
-    server_address = sa.Column(EncryptedType(sa.String, app_config["SECRET_KEY"]))
-    server_port = sa.Column(EncryptedType(sa.Integer, app_config["SECRET_KEY"]))
+    server_address = sa.Column(sa.Text)

Review Comment:
   why aren't these encrypted any more?



-- 
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 #22306: fix(ssh_tunnel): Address Base PR comments from peer review

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

   # [Codecov](https://codecov.io/gh/apache/superset/pull/22306?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 [#22306](https://codecov.io/gh/apache/superset/pull/22306?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d07708b) into [create-sshtunnelconfig-tbl](https://codecov.io/gh/apache/superset/commit/3d3b71bf1584af905ed7de96e692a3a7f5442059?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3d3b71b) will **increase** coverage by `0.00%`.
   > The diff coverage is `60.00%`.
   
   ```diff
   @@                     Coverage Diff                     @@
   ##           create-sshtunnelconfig-tbl   #22306   +/-   ##
   ===========================================================
     Coverage                       55.77%   55.77%           
   ===========================================================
     Files                            1852     1852           
     Lines                           70473    70475    +2     
     Branches                         7689     7689           
   ===========================================================
   + Hits                            39303    39305    +2     
     Misses                          29176    29176           
     Partials                         1994     1994           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `52.45% <60.00%> (-0.14%)` | :arrow_down: |
   | presto | `52.34% <60.00%> (-0.14%)` | :arrow_down: |
   | python | `57.93% <60.00%> (+<0.01%)` | :arrow_up: |
   | unit | `51.05% <60.00%> (+<0.01%)` | :arrow_up: |
   
   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/22306?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/databases/ssh\_tunnel/models.py](https://codecov.io/gh/apache/superset/pull/22306/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) | `77.41% <33.33%> (+0.75%)` | :arrow_up: |
   | [superset/constants.py](https://codecov.io/gh/apache/superset/pull/22306/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% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/22306/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-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `76.47% <100.00%> (ø)` | |
   
   :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] rusackas commented on pull request #22306: fix(ssh_tunnel): Address Base PR comments from peer review

Posted by GitBox <gi...@apache.org>.
rusackas commented on PR #22306:
URL: https://github.com/apache/superset/pull/22306#issuecomment-1335814317

   Re-running CI... will merge if it passes 🤞 


-- 
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] craig-rueda commented on a diff in pull request #22306: fix(ssh_tunnel): Address Base PR comments from peer review

Posted by GitBox <gi...@apache.org>.
craig-rueda commented on code in PR #22306:
URL: https://github.com/apache/superset/pull/22306#discussion_r1038410368


##########
superset/databases/ssh_tunnel/models.py:
##########
@@ -41,15 +42,17 @@ class SSHTunnel(Model, AuditMixinNullable, ExtraJSONMixin, ImportExportMixin):
     __tablename__ = "ssh_tunnels"
 
     id = sa.Column(sa.Integer, primary_key=True)
-    database_id = sa.Column(sa.Integer, sa.ForeignKey("dbs.id"), nullable=False)
+    database_id = sa.Column(
+        sa.Integer, sa.ForeignKey("dbs.id"), nullable=False, unique=True
+    )
     database: Database = relationship(
         "Database",
         backref=backref("ssh_tunnels", cascade="all, delete-orphan"),
         foreign_keys=[database_id],
     )
 
-    server_address = sa.Column(EncryptedType(sa.String, app_config["SECRET_KEY"]))
-    server_port = sa.Column(EncryptedType(sa.Integer, app_config["SECRET_KEY"]))
+    server_address = sa.Column(sa.Text)

Review Comment:
   They shouldn't need to be encrypted, IMO. Server hostname/port shouldn't contain sensitive info :)



-- 
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 #22306: fix(ssh_tunnel): Address Base PR comments from peer review

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


##########
superset/databases/ssh_tunnel/models.py:
##########
@@ -41,15 +42,17 @@ class SSHTunnel(Model, AuditMixinNullable, ExtraJSONMixin, ImportExportMixin):
     __tablename__ = "ssh_tunnels"
 
     id = sa.Column(sa.Integer, primary_key=True)
-    database_id = sa.Column(sa.Integer, sa.ForeignKey("dbs.id"), nullable=False)
+    database_id = sa.Column(
+        sa.Integer, sa.ForeignKey("dbs.id"), nullable=False, unique=True
+    )
     database: Database = relationship(
         "Database",
         backref=backref("ssh_tunnels", cascade="all, delete-orphan"),
         foreign_keys=[database_id],
     )
 
-    server_address = sa.Column(EncryptedType(sa.String, app_config["SECRET_KEY"]))
-    server_port = sa.Column(EncryptedType(sa.Integer, app_config["SECRET_KEY"]))
+    server_address = sa.Column(sa.Text)

Review Comment:
   I was addressing this comment: https://github.com/apache/superset/pull/21912/files#r1035561067 which mentions we don't need those fields encrypted. Do we want to encrypt them? if yes I can rollback.



-- 
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] eschutho commented on a diff in pull request #22306: fix(ssh_tunnel): Address Base PR comments from peer review

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


##########
superset/databases/ssh_tunnel/models.py:
##########
@@ -41,15 +42,17 @@ class SSHTunnel(Model, AuditMixinNullable, ExtraJSONMixin, ImportExportMixin):
     __tablename__ = "ssh_tunnels"
 
     id = sa.Column(sa.Integer, primary_key=True)
-    database_id = sa.Column(sa.Integer, sa.ForeignKey("dbs.id"), nullable=False)
+    database_id = sa.Column(
+        sa.Integer, sa.ForeignKey("dbs.id"), nullable=False, unique=True
+    )
     database: Database = relationship(
         "Database",
         backref=backref("ssh_tunnels", cascade="all, delete-orphan"),
         foreign_keys=[database_id],
     )
 
-    server_address = sa.Column(EncryptedType(sa.String, app_config["SECRET_KEY"]))
-    server_port = sa.Column(EncryptedType(sa.Integer, app_config["SECRET_KEY"]))
+    server_address = sa.Column(sa.Text)

Review Comment:
   looks good.



-- 
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] eschutho merged pull request #22306: fix(ssh_tunnel): Address Base PR comments from peer review

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


-- 
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