-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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: should update last_modified_time in client-side after save dash #11305
fix: should update last_modified_time in client-side after save dash #11305
Conversation
@@ -138,6 +139,7 @@ class HeaderActionsDropdown extends React.PureComponent { | |||
isLoading, | |||
refreshLimit, | |||
refreshWarning, | |||
lastModifiedTime, |
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 thing is getting a little too bloated. I'm wondering whether we can refactor and just pass a dashboard
object to this component.
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.
yes. dashboardInfo
is read only dashboard metadata. I will consider group other edit-able dashboard metadata into another object.
fdef679
to
4109ead
Compare
Codecov Report
@@ Coverage Diff @@
## master #11305 +/- ##
==========================================
- Coverage 62.71% 61.38% -1.34%
==========================================
Files 441 834 +393
Lines 14721 39562 +24841
Branches 3610 3610
==========================================
+ Hits 9233 24286 +15053
- Misses 5307 15095 +9788
Partials 181 181
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…pache#11305) (cherry picked from commit 8863c93)
SUMMARY
This PR is to fix an issue related to #11220 . To reproduce:
The root cause is, after user's first update, the client-side still hold the previous value for dashboard last_updated_time. On user submit the second edit, server-side compare the last_updated_time with newer one and will reject the 2nd edit request.
This PR adds solution for this issue: update last_updated_time in client-side when the first save is successful.
TEST PLAN
CI and new unit test.
ADDITIONAL INFORMATION