You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Always-prog (via GitHub)" <gi...@apache.org> on 2023/07/25 12:34:48 UTC
[GitHub] [superset] Always-prog opened a new pull request, #24796: fix(datasets): give possibility to add dataset with slashes in name
Always-prog opened a new pull request, #24796:
URL: https://github.com/apache/superset/pull/24796
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
Give possibility to users to add datasets which contains slashes in a table name
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
#### Before
https://github.com/apache/superset/assets/66589759/dcf616e9-6775-4e88-8d7e-22d7e06cb00b
#### After
https://github.com/apache/superset/assets/66589759/2e850696-45ab-40e8-b74e-ede9726ab685
### 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 -->
- [x] Has associated issue: [23540](https://github.com/apache/superset/issues/23540)
- [ ] 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] Always-prog commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1651786507
@michael-s-molina I added `path` type to the all endpoints in your list excluding presto.py file because it contains just regex functions with <table_name>, it isn't endpoint.
--
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] michael-s-molina commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1650320564
Thank for the PR @Always-prog. Could you add a test?
--
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] Always-prog commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1650455330
@michael-s-molina Yeah, I can. I'll add 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] michael-s-molina commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1651669462
Here's the list of places that have `<table_name>`:
```
superset/databases/api.py::table_metadata
superset/databases/api.py::table_extra_metadata
superset/databases/api.py::select_star
superset/views/core.py::fetch_datasource_metadata
superset/db_engine_specs/presto.py::TABLE_DOES_NOT_EXIST_REGEX
```
--
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] Always-prog commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1653338561
@michael-s-molina Hello! Can I get code review?
--
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] michael-s-molina commented on a diff in pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #24796:
URL: https://github.com/apache/superset/pull/24796#discussion_r1276199186
##########
tests/integration_tests/databases/api_tests.py:
##########
@@ -686,6 +686,21 @@ def test_if_ssh_tunneling_flag_is_not_active_it_raises_new_exception(
# the DB should not be created
assert model is None
+ def test_get_table_details_with_slash_in_name(self):
+ table_name = "table_with/slash"
+ database = get_example_database()
+ if database.backend in ("mysql", "sqlite"):
Review Comment:
It seems [MySQL](https://stackoverflow.com/questions/9801760/using-slash-in-mysql-database) and [SQLite](https://stackoverflow.com/questions/3694276/what-are-valid-table-names-in-sqlite) support table names with slashes but you need to escape them.
--
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] michael-s-molina commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1655690748
> @michael-s-molina I added MySQL and SQLite to the test case, but why is there an error while migrating? I haven't changed any migrations.
It seems the error was fixed by https://github.com/apache/superset/pull/24832. You need to rebase your PR.
--
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] Always-prog commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1656018112
@michael-s-molina Rebased
--
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] michael-s-molina merged pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina merged PR #24796:
URL: https://github.com/apache/superset/pull/24796
--
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] Always-prog commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1655216073
@michael-s-molina I added MySQL and SQLite to the test case, but why is there an error while migrating? I haven't changed any migrations.
--
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] michael-s-molina commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1651639562
@Always-prog If you do a quick search for `<table_name>` you'll see that there are other endpoints that need to be modified.
@dpgaspar Is there any concern with this change?
--
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] Always-prog commented on pull request #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1651669255
@michael-s-molina I added a test for the slash in the table name and updated the table_name parameter type to `path` in all endpoints.
--
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 #24796: fix(datasets): give possibility to add dataset with slashes in name
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24796:
URL: https://github.com/apache/superset/pull/24796#issuecomment-1649766322
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#24796](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (ed43479) into [master](https://app.codecov.io/gh/apache/superset/commit/cb9b865a5398c479d221308ac6be1bd0a442f778?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (cb9b865) will **decrease** coverage by `0.10%`.
> The diff coverage is `66.75%`.
> :exclamation: Current head ed43479 differs from pull request most recent head cceeb9a. Consider uploading reports for the commit cceeb9a to get more accurate results
```diff
@@ Coverage Diff @@
## master #24796 +/- ##
==========================================
- Coverage 58.35% 58.26% -0.10%
==========================================
Files 1901 1902 +1
Lines 73933 73997 +64
Branches 8183 8195 +12
==========================================
- Hits 43146 43114 -32
- Misses 28666 28764 +98
+ Partials 2121 2119 -2
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| presto | `54.03% <47.70%> (-0.03%)` | :arrow_down: |
| python | `60.96% <61.92%> (-0.29%)` | :arrow_down: |
| unit | `54.95% <58.25%> (+0.04%)` | :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=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files Changed](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...src/components/ColumnTypeLabel/ColumnTypeLabel.tsx](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL2NvbXBvbmVudHMvQ29sdW1uVHlwZUxhYmVsL0NvbHVtblR5cGVMYWJlbC50c3g=) | `100.00% <ø> (ø)` | |
| [...d/packages/superset-ui-chart-controls/src/index.ts](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL2luZGV4LnRz) | `100.00% <ø> (ø)` | |
| [...-chart-controls/src/sections/advancedAnalytics.tsx](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NlY3Rpb25zL2FkdmFuY2VkQW5hbHl0aWNzLnRzeA==) | `14.28% <ø> (ø)` | |
| [...rset-ui-chart-controls/src/sections/chartTitle.tsx](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NlY3Rpb25zL2NoYXJ0VGl0bGUudHN4) | `100.00% <ø> (ø)` | |
| [...legacy-plugin-chart-partition/src/controlPanel.tsx](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LXBhcnRpdGlvbi9zcmMvY29udHJvbFBhbmVsLnRzeA==) | `25.00% <ø> (ø)` | |
| [...gins/legacy-plugin-chart-rose/src/controlPanel.tsx](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LXJvc2Uvc3JjL2NvbnRyb2xQYW5lbC50c3g=) | `50.00% <ø> (ø)` | |
| [...gins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNDb250cm9scy50c3g=) | `100.00% <ø> (ø)` | |
| [.../BigNumber/BigNumberWithTrendline/controlPanel.tsx](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvQmlnTnVtYmVyL0JpZ051bWJlcldpdGhUcmVuZGxpbmUvY29udHJvbFBhbmVsLnRzeA==) | `16.66% <ø> (ø)` | |
| [...s/plugin-chart-echarts/src/Funnel/controlPanel.tsx](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvRnVubmVsL2NvbnRyb2xQYW5lbC50c3g=) | `66.66% <ø> (ø)` | |
| [...ns/plugin-chart-echarts/src/Gauge/controlPanel.tsx](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvR2F1Z2UvY29udHJvbFBhbmVsLnRzeA==) | `66.66% <ø> (ø)` | |
| ... and [131 more](https://app.codecov.io/gh/apache/superset/pull/24796?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
... and [7 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24796/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
: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=apache)
--
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