Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make sure the DeprecatedSelect label is always a string #23758

Merged

Conversation

michael-s-molina
Copy link
Member

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

Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Merging #23758 (eeccdd3) into master (44557f5) will decrease coverage by 0.03%.
The diff coverage is 13.63%.

❗ Current head eeccdd3 differs from pull request most recent head d6d4c3a. Consider uploading reports for the commit d6d4c3a to get more accurate results

@@            Coverage Diff             @@
##           master   #23758      +/-   ##
==========================================
- Coverage   68.11%   68.08%   -0.03%     
==========================================
  Files        1922     1923       +1     
  Lines       74102    74141      +39     
  Branches     8100     8103       +3     
==========================================
+ Hits        50474    50481       +7     
- Misses      21550    21581      +31     
- Partials     2078     2079       +1     
Flag Coverage Δ
javascript 54.11% <5.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...d/src/SqlLab/components/AceEditorWrapper/index.tsx 65.06% <ø> (ø)
...c/components/DeprecatedSelect/DeprecatedSelect.tsx 40.78% <0.00%> (-0.55%) ⬇️
...ols/DndColumnSelectControl/ColumnSelectPopover.tsx 3.29% <0.00%> (-0.04%) ⬇️
...ols/FilterControl/AdhocFilterEditPopover/index.jsx 70.21% <ø> (ø)
...ols/MetricControl/AdhocMetricEditPopover/index.jsx 81.37% <ø> (ø)
superset-frontend/src/explore/constants.ts 100.00% <ø> (ø)
...ontrols/DndColumnSelectControl/useResizeButton.tsx 2.77% <2.77%> (ø)
...t-frontend/src/components/AsyncAceEditor/index.tsx 91.11% <100.00%> (+0.20%) ⬆️
superset/common/query_context_processor.py 89.38% <100.00%> (+0.81%) ⬆️
superset/models/core.py 90.16% <100.00%> (+0.43%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@justinpark justinpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michael-s-molina michael-s-molina merged commit 7a6fb86 into apache:master Apr 20, 2023
michael-s-molina added a commit to airbnb/superset-fork that referenced this pull request Apr 20, 2023
…23758)

Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
(cherry picked from commit 7a6fb86)
john-bodley pushed a commit to airbnb/superset-fork that referenced this pull request Apr 26, 2023
…23758)

Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
(cherry picked from commit 7a6fb86)
sebastianliebscher pushed a commit to sebastianliebscher/superset that referenced this pull request Apr 28, 2023
…23758)

Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants