-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
VAULT-13061: Fix mount path discrepancy in activity log #18916
VAULT-13061: Fix mount path discrepancy in activity log #18916
Conversation
valResp := a.core.router.ValidateMountByAccessor(mountAccessor) | ||
if valResp == nil { | ||
// Only persist valid mounts | ||
continue |
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 want to verify that this is the correct behavior - it seems wrong to me that these currently get thrown out, but I definitely might be missing something
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.
and to clarify, deleted mounts were being excluded from the per-mount breakdown of counts. They were still present in the top-level totals.
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.
Code looks great! Just a few nits on the tests, mainly relating to clarity. Thanks for including the test with this.
Worth noting: I tested this against your feature branch with the transformMonthBreakdowns
changes reset and the test you have passes. Does this align with your expectations, or should we iron out that piece of testing a bit more?
The relevant function to revert is |
There are two problems this PR fixes:
processClientRecord
creates maps that key by mount accessor, but we later assume that the key is a mount path intransformActivityLogMounts
precomputedQueryWorker
), while other times we keep it (transformMonthBreakdowns
). This change means that we will always keep the mount record.Closes #18814, #18812