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/02 23:29:00 UTC

[GitHub] [superset] justinpark opened a new pull request, #22013: fix(sqllab): Add templateParams on kv store

justinpark opened a new pull request, #22013:
URL: https://github.com/apache/superset/pull/22013

   ### SUMMARY
   When "copy link" on SqlLab, it ignores the template parameters. Therefore, it's difficult to share a query with the template variables.
   This commit adds the template parameters in kv store.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before:
   
   https://user-images.githubusercontent.com/1392866/199621087-c4982f9e-66db-406a-8106-8da3663ccf13.mov
   
   After:
   
   https://user-images.githubusercontent.com/1392866/199621083-2dda64db-db79-43b3-9273-5d4c1392cef5.mov
   
   ### TESTING INSTRUCTIONS
   
   enable `SHARE_QUERIES_VIA_KV_STORE` feature
   go to SqlLab and add template parameters
   click "copy link" and then paste the link in the new tab
   check the template parameters in new tab
   
   ### 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] justinpark commented on a diff in pull request #22013: fix(sqllab): Add templateParams on kv store

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


##########
superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx:
##########
@@ -72,6 +72,7 @@ const unsavedQueryEditor = {
   schema: 'query_schema_updated',
   sql: 'SELECT * FROM Updated Limit 100',
   autorun: true,
+  templateParams: '{ "my_value": "foo" }',

Review Comment:
   @john-bodley the following block verify that this extra templateParams payload is being passed through api.
   (`expected` includes this extra parameter)
   
   https://github.com/apache/superset/blob/09a7d01ea763e1335de9975240e0ba97d0bd22e1/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx#L126-L130



-- 
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] justinpark commented on pull request #22013: fix(sqllab): Add templateParams on kv store

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

   @eschutho we're going to merge this change next Monday if you don't have any critical issue.


-- 
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] john-bodley commented on a diff in pull request #22013: fix(sqllab): Add templateParams on kv store

Posted by GitBox <gi...@apache.org>.
john-bodley commented on code in PR #22013:
URL: https://github.com/apache/superset/pull/22013#discussion_r1012395241


##########
superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx:
##########
@@ -72,6 +72,7 @@ const unsavedQueryEditor = {
   schema: 'query_schema_updated',
   sql: 'SELECT * FROM Updated Limit 100',
   autorun: true,
+  templateParams: '{ "my_value": "foo" }',

Review Comment:
   @justinpark how are these template parameters actually leveraged in the test? It's not apparent to me.



-- 
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] justinpark commented on a diff in pull request #22013: fix(sqllab): Add templateParams on kv store

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


##########
superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx:
##########
@@ -72,6 +72,7 @@ const unsavedQueryEditor = {
   schema: 'query_schema_updated',
   sql: 'SELECT * FROM Updated Limit 100',
   autorun: true,
+  templateParams: '{ "my_value": "foo" }',

Review Comment:
   @john-bodley the following block verify that this extra templateParams payload is being passed through api.
   
   https://github.com/apache/superset/blob/09a7d01ea763e1335de9975240e0ba97d0bd22e1/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx#L126-L130



-- 
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] ktmud merged pull request #22013: fix(sqllab): Add templateParams on kv store

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


-- 
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] justinpark commented on pull request #22013: fix(sqllab): Add templateParams on kv store

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

   @eschutho can you help this 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] codecov[bot] commented on pull request #22013: fix(sqllab): Add templateParams on kv store

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

   # [Codecov](https://codecov.io/gh/apache/superset/pull/22013?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 [#22013](https://codecov.io/gh/apache/superset/pull/22013?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (be6df1f) into [master](https://codecov.io/gh/apache/superset/commit/72598a5b2ae6e25aa9e6cfb2d6d664ecea158a92?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (72598a5) will **increase** coverage by `0.03%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #22013      +/-   ##
   ==========================================
   + Coverage   65.72%   65.76%   +0.03%     
   ==========================================
     Files        1809     1812       +3     
     Lines       69335    69402      +67     
     Branches     7413     7448      +35     
   ==========================================
   + Hits        45571    45640      +69     
   + Misses      21853    21842      -11     
   - Partials     1911     1920       +9     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `53.50% <100.00%> (+0.09%)` | :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/22013?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-frontend/src/SqlLab/actions/sqlLab.js](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9hY3Rpb25zL3NxbExhYi5qcw==) | `62.85% <ø> (ø)` | |
   | [...d/src/SqlLab/components/ShareSqlLabQuery/index.tsx](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NoYXJlU3FsTGFiUXVlcnkvaW5kZXgudHN4) | `80.76% <100.00%> (ø)` | |
   | [...t-ui-chart-controls/src/shared-controls/mixins.tsx](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NoYXJlZC1jb250cm9scy9taXhpbnMudHN4) | `16.66% <0.00%> (-16.67%)` | :arrow_down: |
   | [...perset-ui-chart-controls/src/sections/sections.tsx](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NlY3Rpb25zL3NlY3Rpb25zLnRzeA==) | `71.42% <0.00%> (-16.08%)` | :arrow_down: |
   | [...l/AdhocFilterEditPopoverSimpleTabContent/index.tsx](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaWx0ZXJDb250cm9sL0FkaG9jRmlsdGVyRWRpdFBvcG92ZXJTaW1wbGVUYWJDb250ZW50L2luZGV4LnRzeA==) | `62.73% <0.00%> (-6.29%)` | :arrow_down: |
   | [...ontrols/DndColumnSelectControl/DndFilterSelect.tsx](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZEZpbHRlclNlbGVjdC50c3g=) | `42.60% <0.00%> (-1.43%)` | :arrow_down: |
   | [superset-frontend/src/explore/constants.ts](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29uc3RhbnRzLnRz) | `100.00% <0.00%> (ø)` | |
   | [superset-frontend/src/components/Modal/Modal.tsx](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTW9kYWwvTW9kYWwudHN4) | `89.18% <0.00%> (ø)` | |
   | [...perset-frontend/src/addSlice/AddSliceContainer.tsx](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2FkZFNsaWNlL0FkZFNsaWNlQ29udGFpbmVyLnRzeA==) | `59.61% <0.00%> (ø)` | |
   | [...set-frontend/src/explore/actions/hydrateExplore.ts](https://codecov.io/gh/apache/superset/pull/22013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvYWN0aW9ucy9oeWRyYXRlRXhwbG9yZS50cw==) | `57.14% <0.00%> (ø)` | |
   | ... and [21 more](https://codecov.io/gh/apache/superset/pull/22013/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