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: Migration for single metric in Big Number with Time Comparison #27351

Merged

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Mar 1, 2024

SUMMARY

Due to changing metrics control to metric in Big Number with Time Comparison chart, the existing charts were broken due to missing metric in form data. This PR adds a migration which takes the first item from metrics and applies it to the new metric control.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Revert commit fd4f9ac (feat: Use standardized controls in Big Number with Time Comparison)
  2. Create a Big Number with Time Comparison chart and save it
  3. Un-revert the commit
  4. Verify that now the chart is broken - no metric is added
  5. Run the migration
  6. Verify that the chart now works and metric control has a value

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
      Current: 0.13 s
      10+: 0.12 s
      100+: 0.12 s
      1000+: 0.20 s
  • Introduces new feature or API
  • Removes existing feature or API

@kgabryje kgabryje requested a review from a team as a code owner March 1, 2024 09:58
@github-actions github-actions bot added risk:db-migration PRs that require a DB migration plugins labels Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.72%. Comparing base (89d49e5) to head (8ef8c5a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #27351      +/-   ##
==========================================
+ Coverage   67.37%   69.72%   +2.35%     
==========================================
  Files        1908     1908              
  Lines       74550    74550              
  Branches     8317     8317              
==========================================
+ Hits        50225    51982    +1757     
+ Misses      22272    20515    -1757     
  Partials     2053     2053              
Flag Coverage Δ
hive 53.78% <ø> (?)
javascript 57.25% <ø> (ø)
mysql 78.00% <ø> (ø)
postgres 78.10% <ø> (ø)
presto 53.73% <ø> (?)
python 83.12% <ø> (+4.88%) ⬆️
sqlite 77.62% <ø> (ø)
unit 56.50% <ø> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kgabryje kgabryje merged commit ad6327d into apache:master Mar 1, 2024
37 of 38 checks passed
@mistercrunch
Copy link
Member

We should move all to metrics and delete metric forever!

@mistercrunch
Copy link
Member

Also - apologies - super early in the history of Superset (pre-React!) I created multiple metrics-related control instead of creating a more versatile one. I think back then it was backend generate by wtforms and they had different components for single/multiple select...

@sadpandajoe
Copy link
Member

🏷️ preset:2024.8

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 4, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 4, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 7, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 8, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 14, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 19, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 22, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 26, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 26, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 28, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 1, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 2, 2024
betodealmeida pushed a commit that referenced this pull request Apr 25, 2024
eschutho pushed a commit that referenced this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugins risk:db-migration PRs that require a DB migration size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants