-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
feat: bypass cache on screenshots for alerts #17695
Conversation
b5ba0f7
to
b6cac30
Compare
b6cac30
to
395c0d3
Compare
7ddce34
to
3940f0f
Compare
Codecov Report
@@ Coverage Diff @@
## master #17695 +/- ##
==========================================
- Coverage 68.86% 67.95% -0.91%
==========================================
Files 1598 1653 +55
Lines 65297 66373 +1076
Branches 6952 7120 +168
==========================================
+ Hits 44966 45103 +137
- Misses 18446 19373 +927
- Partials 1885 1897 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@betodealmeida does this use a different cache key for reports or by running an alert/report that busts the cache, does it update the explore view as well? |
It's the same cache, so it should update the explore view as well. |
@@ -45,12 +45,27 @@ test('Get url when endpointType:standalone', () => { | |||
expect( | |||
getExploreLongUrl( | |||
params.formData, | |||
params.endpointType, |
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.
This test was wrong.
@betodealmeida Thanks for the PR. I have 1 question: this change only affect |
Right, this is just for alerts. For reports I have another PR that makes it configurable, with the default being to use the cache. |
@betodealmeida If alert triggers a dashboard, will every chart in the dashboard have force refresh? |
That's a great question... right now I'm adding this just for charts, not dashboards. Maybe for dashboards we should also make it configurable (default off), since the impact can be much bigger? |
agree. Thanks! |
* feat: bypass cache on screenshots for alerts * Update existing tests * Add backend test * Add frontend test
* feat: bypass cache on screenshots for alerts * Update existing tests * Add backend test * Add frontend test
SUMMARY
When creating a screenshot for an alert we should bypass the cache. This PR changes the alert jobs to pass
force=true
when fetching a screenshot, and also implements the logic to carry theforce
parameter through the stack.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
I added unit tests to the backend and frontend.
To test locally:
SELECT COUNT(*) FROM bart_lines
and>0
).?force=true
(you can see it in the logs).ADDITIONAL INFORMATION