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/08/29 21:07:33 UTC

[GitHub] [superset] AAfghahi opened a new pull request, #21244: bug: dataset exists error in save Dataset modal

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

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   When a user tried to create a dataset with an already existing name, the current SaveDatasetModal was soft failing. This adds a danger toast to the action that creates datasources. 
   
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   https://user-images.githubusercontent.com/48933336/187299101-4994c359-358c-4634-9243-9653f00a39c0.mov
   
   
   ### 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] AAfghahi commented on pull request #21244: fix: dataset exists error in save Dataset modal

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

   /testenv up


-- 
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] AAfghahi commented on pull request #21244: fix: dataset exists error in save Dataset modal

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

   > @AAfghahi from the video it appears that the modals close and reopen when the error occurs. It does not look ideal for the end user. How hard would it be to wait for the response and then only close the modal when successful and leave it open when unsuccessful? This would avoid the quick close-reopen behaviour currently shown in the video.
   > 
   > Also, I am not sure if it makes more sense to show this error inline in the form? @kasiazjc what you think?
   
   Hey, yeah I am working on that portion right now! 


-- 
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] yousoph commented on pull request #21244: fix: dataset exists error in save Dataset modal

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

   > > @AAfghahi from the video it appears that the modals close and reopen when the error occurs. It does not look ideal for the end user. How hard would it be to wait for the response and then only close the modal when successful and leave it open when unsuccessful? This would avoid the quick close-reopen behaviour currently shown in the video.
   > > Also, I am not sure if it makes more sense to show this error inline in the form? @kasiazjc what you think?
   > 
   > Definitely agree with @geido. Errors should be shown in context, so it would be better to use inline info type. Toast can be easily missed by the user and this pattern is not intuitive.
   
   Inline makes sense to me! We'll plan to do that as a follow up so we can at least give the user some feedback first while we work on improving the display of the message. 


-- 
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 #21244: fix: dataset exists error in save Dataset modal

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

   # [Codecov](https://codecov.io/gh/apache/superset/pull/21244?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 [#21244](https://codecov.io/gh/apache/superset/pull/21244?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1961582) into [master](https://codecov.io/gh/apache/superset/commit/8772e2cdb3b5a500812e7df12c133f9c9f2e6bad?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8772e2c) will **decrease** coverage by `0.19%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #21244      +/-   ##
   ==========================================
   - Coverage   66.43%   66.23%   -0.20%     
   ==========================================
     Files        1784     1784              
     Lines       68163    68163              
     Branches     7264     7264              
   ==========================================
   - Hits        45285    45151     -134     
   - Misses      21010    21144     +134     
     Partials     1868     1868              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | postgres | `80.93% <ø> (+0.01%)` | :arrow_up: |
   | presto | `?` | |
   | python | `80.94% <ø> (-0.41%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `50.65% <ø> (ø)` | |
   
   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/21244?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/21244/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==) | `61.37% <0.00%> (ø)` | |
   | [...d/src/SqlLab/components/SaveDatasetModal/index.tsx](https://codecov.io/gh/apache/superset/pull/21244/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NhdmVEYXRhc2V0TW9kYWwvaW5kZXgudHN4) | `52.87% <ø> (ø)` | |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/21244/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-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/21244/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `71.09% <0.00%> (-16.02%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/21244/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `81.32% <0.00%> (-6.63%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/21244/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `91.89% <0.00%> (-5.41%)` | :arrow_down: |
   | [superset/utils/celery.py](https://codecov.io/gh/apache/superset/pull/21244/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-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `86.20% <0.00%> (-3.45%)` | :arrow_down: |
   | [superset/connectors/sqla/utils.py](https://codecov.io/gh/apache/superset/pull/21244/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-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3V0aWxzLnB5) | `86.36% <0.00%> (-2.28%)` | :arrow_down: |
   | [superset/models/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/21244/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-c3VwZXJzZXQvbW9kZWxzL3NxbF9sYWIucHk=) | `74.90% <0.00%> (-2.00%)` | :arrow_down: |
   | [superset/result\_set.py](https://codecov.io/gh/apache/superset/pull/21244/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-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.29% <0.00%> (-1.49%)` | :arrow_down: |
   | ... and [11 more](https://codecov.io/gh/apache/superset/pull/21244/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] kasiazjc commented on pull request #21244: fix: dataset exists error in save Dataset modal

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

   > @AAfghahi from the video it appears that the modals close and reopen when the error occurs. It does not look ideal for the end user. How hard would it be to wait for the response and then only close the modal when successful and leave it open when unsuccessful? This would avoid the quick close-reopen behaviour currently shown in the video.
   > 
   > Also, I am not sure if it makes more sense to show this error inline in the form? @kasiazjc what you think?
   
   Definitely agree with @geido. Errors should be shown in context, so it would be better to use inline info type. Toast can be easily missed by the user and this pattern is not intuitive. 


-- 
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] github-actions[bot] commented on pull request #21244: fix: dataset exists error in save Dataset modal

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

   @AAfghahi Ephemeral environment spinning up at http://35.92.135.26:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.


-- 
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] AAfghahi merged pull request #21244: fix: dataset exists error in save Dataset modal

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


-- 
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 #21244: fix: dataset exists error in save Dataset modal

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


##########
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx:
##########
@@ -307,9 +307,11 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
       })
       .catch(() => {
         addDangerToast(t('An error occurred saving dataset'));
+        onHide();
       });
 
     setDatasetName(getDefaultDatasetName());
+    console.log(formData);

Review Comment:
   remove this



-- 
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] geido commented on pull request #21244: fix: dataset exists error in save Dataset modal

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

   @AAfghahi from the video it appears that the modals close and reopen when the error occurs. It does not look ideal for the end user. How hard would it be to wait for the response and then only close the modal when successful and leave it open when unsuccessful? This would avoid the quick close-reopen behaviour currently shown in the video.
   
   Also, I am not sure if we it makes more sense to show this error inline in the form? @kasiazjc what you think?


-- 
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] github-actions[bot] commented on pull request #21244: fix: dataset exists error in save Dataset modal

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

   Ephemeral environment shutdown and build artifacts deleted.


-- 
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] AAfghahi commented on pull request #21244: fix: dataset exists error in save Dataset modal

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

   @geido Fixed in latest. 
   
   
   https://user-images.githubusercontent.com/48933336/187474290-0624757d-be6a-4f7a-b509-48a425d089f7.mov
   
   


-- 
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] AAfghahi commented on a diff in pull request #21244: fix: dataset exists error in save Dataset modal

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


##########
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx:
##########
@@ -307,9 +307,11 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
       })
       .catch(() => {
         addDangerToast(t('An error occurred saving dataset'));
+        onHide();
       });
 
     setDatasetName(getDefaultDatasetName());
+    console.log(formData);

Review Comment:
   yup removed. 



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