-
Notifications
You must be signed in to change notification settings - Fork 14k
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: Removetime_range_endpoints
from query context object
#19423
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19423 +/- ##
=======================================
Coverage 66.57% 66.57%
=======================================
Files 1675 1675
Lines 64092 64092
Branches 6519 6519
=======================================
Hits 42672 42672
Misses 19729 19729
Partials 1691 1691
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some codes suggestion.
superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py
Outdated
Show resolved
Hide resolved
superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py
Outdated
Show resolved
Hide resolved
…nts_from_qc.py Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com>
time_range_endpoints
from query context objecttime_range_endpoints
from query context object
…nts_from_qc.py Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com>
❗ Please consider rebasing your branch to avoid db migration conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hughhhh. LGTM.
@hughhhh before merging, I would recommend also running through the db migration benchmark script and checkboxes in the PR description and add the results of the benchmark to the description. |
This PR is a follow up to #18936 |
Before this fix, users were getting an error when requesting a CSV or text report. PNG reports were working as expected Repro steps:
Current behavior: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a suggestion on the try/except.
superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py
Outdated
Show resolved
Hide resolved
…nts_from_qc.py Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
🏷️ preset:2022.11 |
…9423) * template for remove time_range_endpoints from query context * Update superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com> * Update superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com> * fix reference * fix column reference * fix * Update superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com> Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> (cherry picked from commit 129063d)
* template for remove time_range_endpoints from query context * Update superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com> * Update superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com> * fix reference * fix column reference * fix * Update superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com> Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> (cherry picked from commit 129063d)
🏷️ preset:2022.13 |
…9423) * template for remove time_range_endpoints from query context * Update superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com> * Update superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com> * fix reference * fix column reference * fix * Update superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> Co-authored-by: Yongjie Zhao <yongjie.zhao@gmail.com> Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
SUMMARY
When running reports/alerts charts are getting the following 400 error, due deprecating time_range_endpoints field.
To fix this we'll be running a migration to remove all the
time_range_endpoints
keys from theslice.query_context
. We are only updating the query_context that are valid jsonBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
Downgrade:
Upgrade: