-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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: new alert should have force_screenshot be true #18182
fix: new alert should have force_screenshot be true #18182
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18182 +/- ##
==========================================
+ Coverage 66.04% 66.27% +0.23%
==========================================
Files 1591 1594 +3
Lines 62409 62485 +76
Branches 6283 6312 +29
==========================================
+ Hits 41221 41415 +194
+ Misses 19567 19421 -146
- Partials 1621 1649 +28
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
ping @betodealmeida and @eschutho for code review. thanks! |
const data: any = { | ||
...currentAlert, | ||
type: isReport ? 'Report' : 'Alert', | ||
force_screenshot: forceScreenshot ? 'true' : 'false', | ||
force_screenshot: | ||
shouldEnableForceScreenshot || forceScreenshot ? 'true' : 'false', |
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.
Can we change this to boolean
and update line 520 to const data: AlertObject
while we are here?
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.
i fixed force_screenshot
to be boolean
type. But data
is not AlertObject
, see line 553 ~ 559, it is temporary object carried a lot of extra fields.
* fix: new alert should have force_screenshot be true * fix comments
* fix: new alert should have force_screenshot be true * fix comments
* fix: new alert should have force_screenshot be true * fix comments
SUMMARY
From feature #17853, when a chart alert condition is matched, Superset will do force_refresh query and generate a screenshot. We also had db migration to set all chart alerts' force_refresh attribute be true.
But when user create new chart alert, its force_refresh is false. This PR is to fix this issue, and set force_refresh default be true when creating new chart alert.
TESTING INSTRUCTIONS
CI and manual test:
force_refresh
value from report_scedule table.ADDITIONAL INFORMATION