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: Chart crashing if timeseries_limit_metric is an empty array #23480

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

kgabryje
Copy link
Member

SUMMARY

In some existing charts, timeseries_limit_metric could be an empty array instead of expected string or metric object. That caused a bug where an empty array was pushed to metrics array in buildQuery, causing error like on the screenshot.

Shoutout to @villebro for reproducing the problem and suggesting a solution!

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

TESTING INSTRUCTIONS

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

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM!

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #23480 (0b4b1c5) into master (be2eb31) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 0b4b1c5 differs from pull request most recent head 643b8ef. Consider uploading reports for the commit 643b8ef to get more accurate results

@@           Coverage Diff           @@
##           master   #23480   +/-   ##
=======================================
  Coverage   67.64%   67.64%           
=======================================
  Files        1908     1908           
  Lines       73738    73739    +1     
  Branches     7987     7987           
=======================================
+ Hits        49878    49879    +1     
  Misses      21814    21814           
  Partials     2046     2046           
Flag Coverage Δ
javascript 53.82% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...ontrols/src/operators/utils/extractExtraMetrics.ts 100.00% <100.00%> (ø)

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

@kgabryje kgabryje merged commit 4530542 into apache:master Mar 24, 2023
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 24, 2023
@sadpandajoe
Copy link
Member

🏷️ preset:2023.11

@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/S 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants