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/11/16 21:01:07 UTC
[GitHub] [superset] Antonio-RiveroMartnez opened a new pull request, #22144: feat(ssh_tunnel): Add SSH Tunnel feature flags
Antonio-RiveroMartnez opened a new pull request, #22144:
URL: https://github.com/apache/superset/pull/22144
### SUMMARY
- Add SSH Tunnel feature flags
### 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 #22144: feat(ssh_tunnel): Add SSH Tunnel feature flags
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #22144:
URL: https://github.com/apache/superset/pull/22144#discussion_r1025653135
##########
superset/config.py:
##########
@@ -1436,6 +1436,18 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
},
}
+# ------------------------------
+# SSH Tunnel
+# ------------------------------
+# Allow users to enable ssh tunneling when creating a DB.
+# Users must check whether the DB engine supports SSH Tunnels
+# otherwise enabling this flag won't have any effect on the DB.
+SSH_TUNNEL_ENABLE = False
Review Comment:
I would make this one a feature flag, and the below one a config, like you have it.
--
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 #22144: feat(ssh_tunnel): Add SSH Tunnel feature flags
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #22144:
URL: https://github.com/apache/superset/pull/22144#discussion_r1025654464
##########
superset/config.py:
##########
@@ -1436,6 +1436,18 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
},
}
+# ------------------------------
+# SSH Tunnel
+# ------------------------------
+# Allow users to enable ssh tunneling when creating a DB.
+# Users must check whether the DB engine supports SSH Tunnels
+# otherwise enabling this flag won't have any effect on the DB.
+SSH_TUNNEL_ENABLE = False
+
+# Allow users to set the host used when connecting to the SSH Tunnel
+# as localhost and any other alias (0.0.0.0)
+SSH_TUNNEL_ALLOWED_ALIASES_FOR_HOST: List[str] = []
Review Comment:
how can we make this so that it doesn't break existing functionality, but still let's people remove localhost if they want to?
##########
superset/config.py:
##########
@@ -1436,6 +1436,18 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
},
}
+# ------------------------------
+# SSH Tunnel
+# ------------------------------
+# Allow users to enable ssh tunneling when creating a DB.
+# Users must check whether the DB engine supports SSH Tunnels
+# otherwise enabling this flag won't have any effect on the DB.
+SSH_TUNNEL_ENABLE = False
+
+# Allow users to set the host used when connecting to the SSH Tunnel
+# as localhost and any other alias (0.0.0.0)
+SSH_TUNNEL_ALLOWED_ALIASES_FOR_HOST: List[str] = []
Review Comment:
how can we make this so that it doesn't break existing functionality, but still lets people remove localhost if they want to?
--
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 #22144: feat(ssh_tunnel): Add SSH Tunnel feature flags
Posted by GitBox <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #22144:
URL: https://github.com/apache/superset/pull/22144#discussion_r1025692856
##########
superset/config.py:
##########
@@ -1436,6 +1436,18 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
},
}
+# ------------------------------
+# SSH Tunnel
+# ------------------------------
+# Allow users to enable ssh tunneling when creating a DB.
+# Users must check whether the DB engine supports SSH Tunnels
+# otherwise enabling this flag won't have any effect on the DB.
+SSH_TUNNEL_ENABLE = False
Review Comment:
oh cool! I didn't know about these `DEFAULT_FEATURE_FLAGS`. 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] eschutho closed pull request #22144: feat(ssh_tunnel): Add SSH Tunnel feature flags
Posted by GitBox <gi...@apache.org>.
eschutho closed pull request #22144: feat(ssh_tunnel): Add SSH Tunnel feature flags
URL: https://github.com/apache/superset/pull/22144
--
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 #22144: feat(ssh_tunnel): Add SSH Tunnel feature flags
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #22144:
URL: https://github.com/apache/superset/pull/22144#issuecomment-1319201723
# [Codecov](https://codecov.io/gh/apache/superset/pull/22144?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 [#22144](https://codecov.io/gh/apache/superset/pull/22144?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a56ce08) into [create-sshtunnelconfig-tbl](https://codecov.io/gh/apache/superset/commit/e8a0a5ee5c470b943b29c3a6f99d6cca41191eef?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e8a0a5e) will **decrease** coverage by `11.18%`.
> The diff coverage is `72.05%`.
```diff
@@ Coverage Diff @@
## create-sshtunnelconfig-tbl #22144 +/- ##
===============================================================
- Coverage 66.94% 55.76% -11.19%
===============================================================
Files 1832 1838 +6
Lines 69930 70079 +149
Branches 7571 7571
===============================================================
- Hits 46818 39082 -7736
- Misses 21153 29038 +7885
Partials 1959 1959
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `52.61% <50.00%> (+0.01%)` | :arrow_up: |
| postgres | `?` | |
| presto | `52.51% <50.00%> (+0.01%)` | :arrow_up: |
| python | `57.91% <72.05%> (-23.38%)` | :arrow_down: |
| unit | `51.05% <72.05%> (+0.19%)` | :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/22144?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/commands/validate.py](https://codecov.io/gh/apache/superset/pull/22144/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-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3ZhbGlkYXRlLnB5) | `28.81% <0.00%> (-49.16%)` | :arrow_down: |
| [superset/databases/commands/export.py](https://codecov.io/gh/apache/superset/pull/22144/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-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2V4cG9ydC5weQ==) | `36.17% <14.28%> (-55.32%)` | :arrow_down: |
| [superset/charts/commands/export.py](https://codecov.io/gh/apache/superset/pull/22144/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-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4cG9ydC5weQ==) | `52.94% <25.00%> (-41.18%)` | :arrow_down: |
| [superset/dashboards/commands/export.py](https://codecov.io/gh/apache/superset/pull/22144/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-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9leHBvcnQucHk=) | `39.18% <25.00%> (-44.60%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/22144/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=) | `75.99% <36.36%> (-13.88%)` | :arrow_down: |
| [superset/databases/ssh\_tunnel/models.py](https://codecov.io/gh/apache/superset/pull/22144/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) | `76.66% <76.66%> (ø)` | |
| [superset/databases/ssh\_tunnel/commands/delete.py](https://codecov.io/gh/apache/superset/pull/22144/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-c3VwZXJzZXQvZGF0YWJhc2VzL3NzaF90dW5uZWwvY29tbWFuZHMvZGVsZXRlLnB5) | `87.50% <87.50%> (ø)` | |
| [superset/config.py](https://codecov.io/gh/apache/superset/pull/22144/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-c3VwZXJzZXQvY29uZmlnLnB5) | `91.25% <100.00%> (-0.60%)` | :arrow_down: |
| [superset/databases/commands/test\_connection.py](https://codecov.io/gh/apache/superset/pull/22144/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-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3Rlc3RfY29ubmVjdGlvbi5weQ==) | `64.93% <100.00%> (-33.74%)` | :arrow_down: |
| [superset/databases/dao.py](https://codecov.io/gh/apache/superset/pull/22144/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-c3VwZXJzZXQvZGF0YWJhc2VzL2Rhby5weQ==) | `72.91% <100.00%> (-27.09%)` | :arrow_down: |
| ... and [296 more](https://codecov.io/gh/apache/superset/pull/22144/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] eschutho commented on a diff in pull request #22144: feat(ssh_tunnel): Add SSH Tunnel feature flags
Posted by GitBox <gi...@apache.org>.
eschutho commented on code in PR #22144:
URL: https://github.com/apache/superset/pull/22144#discussion_r1025653793
##########
superset/config.py:
##########
@@ -1436,6 +1436,18 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
},
}
+# ------------------------------
+# SSH Tunnel
+# ------------------------------
+# Allow users to enable ssh tunneling when creating a DB.
+# Users must check whether the DB engine supports SSH Tunnels
+# otherwise enabling this flag won't have any effect on the DB.
+SSH_TUNNEL_ENABLE = False
Review Comment:
So, this one can go in `DEFAULT_FEATURE_FLAGS` and I would just name it the name of the feature. In other words, you can drop "enable" from the name.
--
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