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: add having_druid back into the chart schema #20879

Merged

Conversation

eschutho
Copy link
Member

@eschutho eschutho commented Jul 27, 2022

SUMMARY

The having_druid key still exists in some query table extras json blobs in the database. We removed the key from the chart schema in the native druid cleanup work #20338 but need to run a migration in order to remove the key permanently from query objects in the database. This PR is a temporary fix to add the property back into the schema for an easier cherry prior to the db migration. We need to remove this property again and run the migration together next.

The error that we're seeing is on some reports that still have the old key{"message":"Request is incorrect: {'queries': {0: {'extras': {'having_druid': ['Unknown field.']}}}}"}

TESTING INSTRUCTIONS

I added having_druid to an existing test and validated that it failed and then fixed the code and validated that it passed.

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

@eschutho eschutho force-pushed the elizabeth/fix-druid-deprecation-error branch from 2c3d9f0 to f321123 Compare July 27, 2022 00:04
@eschutho eschutho changed the title add having_druid back into the schema fix: add having_druid back into the schema Jul 27, 2022
@eschutho eschutho changed the title fix: add having_druid back into the schema fix: add having_druid back into the chart schema Jul 27, 2022
Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

😿 to see Druid NoSQL make a brief—and hopefully short lived—return.

@eschutho
Copy link
Member Author

eschutho commented Jul 27, 2022

😿 to see Druid NoSQL make a brief—and hopefully short lived—return.

Ha, yeah, I know. 😢 We'll do a fast-follow migration.

@codecov
Copy link

codecov bot commented Jul 27, 2022

Codecov Report

Merging #20879 (f321123) into master (1b577d1) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #20879      +/-   ##
==========================================
+ Coverage   66.23%   66.25%   +0.02%     
==========================================
  Files        1757     1758       +1     
  Lines       66978    66988      +10     
  Branches     7117     7117              
==========================================
+ Hits        44360    44386      +26     
+ Misses      20801    20785      -16     
  Partials     1817     1817              
Flag Coverage Δ
hive 53.28% <100.00%> (+0.02%) ⬆️
mysql 81.07% <100.00%> (+<0.01%) ⬆️
postgres 81.14% <100.00%> (+<0.01%) ⬆️
presto 53.14% <100.00%> (+0.02%) ⬆️
python 81.59% <100.00%> (+0.05%) ⬆️
sqlite 79.76% <100.00%> (?)
unit 50.29% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
superset/charts/schemas.py 99.35% <100.00%> (+<0.01%) ⬆️
superset/reports/commands/exceptions.py 97.97% <0.00%> (-0.98%) ⬇️
superset/models/dashboard.py 76.07% <0.00%> (-0.21%) ⬇️
superset/reports/commands/execute.py 91.41% <0.00%> (-0.19%) ⬇️
superset/reports/api.py 90.22% <0.00%> (ø)
superset/reports/commands/base.py 92.30% <0.00%> (ø)
superset/reports/commands/alert.py 96.59% <0.00%> (ø)
superset/reports/commands/delete.py 90.32% <0.00%> (ø)
superset/reports/commands/update.py 89.55% <0.00%> (ø)
superset/reports/commands/bulk_delete.py 90.32% <0.00%> (ø)
... and 13 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@eschutho eschutho merged commit cd578d2 into apache:master Jul 27, 2022
@sadpandajoe
Copy link
Member

🏷️ preset:2022.29

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Jul 27, 2022
@eschutho eschutho deleted the elizabeth/fix-druid-deprecation-error branch October 21, 2022 21:00
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 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 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants