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 2021/10/07 14:36:40 UTC

[GitHub] [superset] geido opened a new pull request #17013: fix: Verify when null value should be undefined in Select

geido opened a new pull request #17013:
URL: https://github.com/apache/superset/pull/17013


   ### SUMMARY
   This PR fixes an edge case with the Select component. With dynamic controls there might be the case where a default value is being passed as `null` when it was intended to be `undefined`. This change makes sure that a `null` value that is not available in the options is considered as`undefined` instead.
   
   ### BEFORE
   ![Screen Shot 2021-10-07 at 17 35 15](https://user-images.githubusercontent.com/60598000/136406429-fc33a0d2-afd0-48bf-838d-0168d1c83ce9.png)
   
   ### AFTER
   ![Screen Shot 2021-10-07 at 17 33 45](https://user-images.githubusercontent.com/60598000/136406179-3ee489de-0cdd-4c01-9ece-38ccdd60df43.png)
   
   ### TESTING INSTRUCTIONS
   1. Create a Histogram chart
   2. Observe the Columns control
   
   ### 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] geido commented on pull request #17013: fix: Verify when null value should be undefined in Select

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


   @michael-s-molina for clarity, this is just a safety check for now. Ideally, we should go through each configuration object of the SelectControl in superset and superset-ui and remove the `default` value when it's `null` but it's meant to be `undefined`.


-- 
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 #17013: fix: Verify when null value should be undefined in Select

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


   🏷 v1.4


-- 
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 merged pull request #17013: fix: Verify when null value should be undefined in Select

Posted by GitBox <gi...@apache.org>.
geido merged pull request #17013:
URL: https://github.com/apache/superset/pull/17013


   


-- 
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 #17013: fix: Verify when null value should be undefined in Select

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/17013?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 [#17013](https://codecov.io/gh/apache/superset/pull/17013?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3be175a) into [master](https://codecov.io/gh/apache/superset/commit/9e980b6f2b309d7d80d81a3465e4297d2f97efd9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9e980b6) will **decrease** coverage by `0.00%`.
   > The diff coverage is `76.92%`.
   
   > :exclamation: Current head 3be175a differs from pull request most recent head a5aabfb. Consider uploading reports for the commit a5aabfb to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17013/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17013?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #17013      +/-   ##
   ==========================================
   - Coverage   76.94%   76.93%   -0.01%     
   ==========================================
     Files        1030     1030              
     Lines       55088    55098      +10     
     Branches     7480     7484       +4     
   ==========================================
   + Hits        42385    42392       +7     
   - Misses      12452    12455       +3     
     Partials      251      251              
   ```
   
   | Flag | Coverage Ξ” | |
   |---|---|---|
   | javascript | `70.90% <76.92%> (-0.01%)` | :arrow_down: |
   
   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/17013?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | |
   |---|---|---|
   | [.../src/explore/components/controls/SelectControl.jsx](https://codecov.io/gh/apache/superset/pull/17013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9TZWxlY3RDb250cm9sLmpzeA==) | `77.61% <75.00%> (-1.08%)` | :arrow_down: |
   | [...e/components/controls/SelectAsyncControl/index.tsx](https://codecov.io/gh/apache/superset/pull/17013/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9TZWxlY3RBc3luY0NvbnRyb2wvaW5kZXgudHN4) | `80.48% <80.00%> (-0.60%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17013?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17013?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9e980b6...a5aabfb](https://codecov.io/gh/apache/superset/pull/17013?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] geido commented on pull request #17013: fix: Verify when null value should be undefined in Select

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


   For reference, we have agreed with Michael that this safety check will be done in `SelectControl` and `SelectAsyncControl` as those are the components where this problem might happen more often. I am about to update this 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] geido commented on pull request #17013: fix: Verify when null value should be undefined in Select

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


   @michael-s-molina I just updated the PR. Please have a look


-- 
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 #17013: fix: Verify when null value should be undefined in Select

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


   @michael-s-molina for clarity, this is just a safety check for now. Ideally, we should go through each configuration object of the SelectControl in superset and superset-ui and remove the `default` value when it's `null` but it's meant to be `undefined`.


-- 
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 removed a comment on pull request #17013: fix: Verify when null value should be undefined in Select

Posted by GitBox <gi...@apache.org>.
AAfghahi removed a comment on pull request #17013:
URL: https://github.com/apache/superset/pull/17013#issuecomment-972124247


   🏷 v1.4


-- 
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 #17013: fix: Verify when null value should be undefined in Select

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


   🏷 v1.4


-- 
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 edited a comment on pull request #17013: fix: Verify when null value should be undefined in Select

Posted by GitBox <gi...@apache.org>.
geido edited a comment on pull request #17013:
URL: https://github.com/apache/superset/pull/17013#issuecomment-937985441


   @michael-s-molina for clarity, this is just a safety check for now. Ideally, we should go through each configuration object of the SelectControl in superset and superset-ui and remove the `default` value when it's `null` but it's meant to be `undefined`. I can do that in separate PRs.


-- 
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 #17013: fix: Verify when null value should be undefined in Select

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on pull request #17013:
URL: https://github.com/apache/superset/pull/17013#issuecomment-938581484


   > @michael-s-molina for clarity, this is just a safety check for now. Ideally, we should go through each configuration object of the SelectControl in superset and superset-ui and remove the `default` value when it's `null` but it's meant to be `undefined`. I can do that in separate PRs.
   
   @geido Can't this check be made in `SelectControl`?


-- 
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 edited a comment on pull request #17013: fix: Verify when null value should be undefined in Select

Posted by GitBox <gi...@apache.org>.
michael-s-molina edited a comment on pull request #17013:
URL: https://github.com/apache/superset/pull/17013#issuecomment-938581484


   > @michael-s-molina for clarity, this is just a safety check for now. Ideally, we should go through each configuration object of the SelectControl in superset and superset-ui and remove the `default` value when it's `null` but it's meant to be `undefined`. I can do that in separate PRs.
   
   @geido Can't this check/conversion be made in `SelectControl`?


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