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: import dash with missing immune ID #17732

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

When importing a dashboard the list of immune chart IDs might contain a chart that was removed from the dashboard, while the ID remained inside immune. This will result in an error when importing the dashboard.

I fixed it by ignoring IDs for charts that are not present in the dashboard. Ideally we should also fix the export so that these IDs are not present, and also improve the logic so that when a chart is removed from the dashboard its ID is also removed from immune if present.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

I added unit tests covering the bug.

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

@codecov
Copy link

codecov bot commented Dec 13, 2021

Codecov Report

Merging #17732 (039f91f) into master (0d2299c) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17732   +/-   ##
=======================================
  Coverage   68.06%   68.07%           
=======================================
  Files        1653     1653           
  Lines       66374    66374           
  Branches     7121     7121           
=======================================
+ Hits        45177    45181    +4     
+ Misses      19300    19296    -4     
  Partials     1897     1897           
Flag Coverage Δ
hive 81.78% <ø> (ø)
mysql 82.15% <ø> (ø)
postgres 82.20% <ø> (+0.01%) ⬆️
python 82.54% <ø> (+0.01%) ⬆️
sqlite 81.88% <ø> (ø)

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

Impacted Files Coverage Δ
superset/dashboards/commands/importers/v1/utils.py 81.42% <ø> (ø)
superset/reports/commands/execute.py 91.22% <0.00%> (+0.38%) ⬆️
superset/common/query_object.py 95.62% <0.00%> (+0.54%) ⬆️
superset/commands/importers/v1/utils.py 91.30% <0.00%> (+2.17%) ⬆️
superset/reports/commands/log_prune.py 89.28% <0.00%> (+3.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d2299c...039f91f. Read the comment docs.

@betodealmeida betodealmeida merged commit fceabf6 into apache:master Dec 14, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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/L 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants