You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2023/04/20 16:55:14 UTC
[GitHub] [superset] michael-s-molina opened a new pull request, #23758: fix: Make sure the DeprecatedSelect label is always a string
michael-s-molina opened a new pull request, #23758:
URL: https://github.com/apache/superset/pull/23758
### SUMMARY
The `options` property of the `DeprecatedSelect` has its type defined from `OptionType` which extends `OptionTypeBase` and allows `any` values. Because of that, this PR adds an explicit string conversion when processing the `label` property to make sure it's a text and prevent rendering exceptions. One example of the necessary conversion is when the options have `BigNumber` as labels.
### ADDITIONAL INFORMATION
- [ ] 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] codecov[bot] commented on pull request #23758: fix: Make sure the DeprecatedSelect label is always a string
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #23758:
URL: https://github.com/apache/superset/pull/23758#issuecomment-1516722074
## [Codecov](https://codecov.io/gh/apache/superset/pull/23758?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 [#23758](https://codecov.io/gh/apache/superset/pull/23758?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (716c54f) into [master](https://codecov.io/gh/apache/superset/commit/44557f5a23d5a6b8f7d6cc267f0d43337c36cd76?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (44557f5) will **decrease** coverage by `0.03%`.
> The diff coverage is `13.95%`.
> :exclamation: Current head 716c54f differs from pull request most recent head d6d4c3a. Consider uploading reports for the commit d6d4c3a to get more accurate results
```diff
@@ Coverage Diff @@
## master #23758 +/- ##
==========================================
- Coverage 68.11% 68.08% -0.03%
==========================================
Files 1922 1923 +1
Lines 74102 74140 +38
Branches 8100 8103 +3
==========================================
+ Hits 50474 50481 +7
- Misses 21550 21581 +31
Partials 2078 2078
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `54.11% <5.12%> (-0.05%)` | :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/23758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...d/src/SqlLab/components/AceEditorWrapper/index.tsx](https://codecov.io/gh/apache/superset/pull/23758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL0FjZUVkaXRvcldyYXBwZXIvaW5kZXgudHN4) | `65.06% <ø> (ø)` | |
| [...c/components/DeprecatedSelect/DeprecatedSelect.tsx](https://codecov.io/gh/apache/superset/pull/23758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRGVwcmVjYXRlZFNlbGVjdC9EZXByZWNhdGVkU2VsZWN0LnRzeA==) | `41.33% <0.00%> (ø)` | |
| [...ols/DndColumnSelectControl/ColumnSelectPopover.tsx](https://codecov.io/gh/apache/superset/pull/23758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0NvbHVtblNlbGVjdFBvcG92ZXIudHN4) | `3.29% <0.00%> (-0.04%)` | :arrow_down: |
| [...ols/FilterControl/AdhocFilterEditPopover/index.jsx](https://codecov.io/gh/apache/superset/pull/23758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaWx0ZXJDb250cm9sL0FkaG9jRmlsdGVyRWRpdFBvcG92ZXIvaW5kZXguanN4) | `70.21% <ø> (ø)` | |
| [...ols/MetricControl/AdhocMetricEditPopover/index.jsx](https://codecov.io/gh/apache/superset/pull/23758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL0FkaG9jTWV0cmljRWRpdFBvcG92ZXIvaW5kZXguanN4) | `81.37% <ø> (ø)` | |
| [superset-frontend/src/explore/constants.ts](https://codecov.io/gh/apache/superset/pull/23758?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% <ø> (ø)` | |
| [...ontrols/DndColumnSelectControl/useResizeButton.tsx](https://codecov.io/gh/apache/superset/pull/23758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL3VzZVJlc2l6ZUJ1dHRvbi50c3g=) | `2.77% <2.77%> (ø)` | |
| [...t-frontend/src/components/AsyncAceEditor/index.tsx](https://codecov.io/gh/apache/superset/pull/23758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQXN5bmNBY2VFZGl0b3IvaW5kZXgudHN4) | `91.11% <100.00%> (+0.20%)` | :arrow_up: |
| [superset/common/query\_context\_processor.py](https://codecov.io/gh/apache/superset/pull/23758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29tbW9uL3F1ZXJ5X2NvbnRleHRfcHJvY2Vzc29yLnB5) | `89.38% <100.00%> (+0.81%)` | :arrow_up: |
| [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/23758?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=) | `90.16% <100.00%> (+0.43%)` | :arrow_up: |
... and [1 file with indirect coverage changes](https://codecov.io/gh/apache/superset/pull/23758/indirect-changes?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] justinpark commented on a diff in pull request #23758: fix: Make sure the DeprecatedSelect label is always a string
Posted by "justinpark (via GitHub)" <gi...@apache.org>.
justinpark commented on code in PR #23758:
URL: https://github.com/apache/superset/pull/23758#discussion_r1172871351
##########
superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx:
##########
@@ -167,7 +167,7 @@ function styled<
getOptionLabel = option =>
typeof option === 'string'
? option
- : option[labelKey] || option[valueKey],
+ : String(option[labelKey]) || String(option[valueKey]),
Review Comment:
`null` or `undefined` value can be a string of `null` or `undefined` (which might be intended.)
```suggestion
: `${option[labelKey] ?? option[valueKey] ?? ''}`
```
--
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 #23758: fix: Make sure the DeprecatedSelect label is always a string
Posted by "justinpark (via GitHub)" <gi...@apache.org>.
justinpark commented on code in PR #23758:
URL: https://github.com/apache/superset/pull/23758#discussion_r1172906809
##########
superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx:
##########
@@ -161,13 +161,15 @@ function styled<
filterOption,
ignoreAccents = false, // default is `true`, but it is slow
+ asText = (value: any) => (value ? String(value) : ''),
Review Comment:
when value is `0`, it will returns `''`. Please use nullish coalescing operator(`??`) to avoid the case.
```suggestion
asText = (value: any) => String(value ?? ''),
```
--
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 #23758: fix: Make sure the DeprecatedSelect label is always a string
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina merged PR #23758:
URL: https://github.com/apache/superset/pull/23758
--
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