-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[Entitlements] Improve FileAccessTree logging #127050
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
[Entitlements] Improve FileAccessTree logging #127050
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
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.
These seem like good trace messages to have. Could we also have more debug level, like eg dumping the path arrays if FileAccessTree? That would have made debugging the windows casing issue easier. Since it happens just once per module I think it could be debug level.
I was unsure if I needed to add that; we dump the path array we try to match with in canRead/canWrite already, so it felt like a duplication. But it does not hurt, and we can add e.g. exclusive paths too, especially because it happens once (so it can happen at a debug level). I'll add that. |
Maybe we could simplify the trace level to only include the path we are looking for (and maybe the path we match if any), and leave the dump to debug level when the access tree is created? |
…e-fileaccesstree-logging
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
return checkPath(normalizePath(path), writePaths); | ||
var normalizedPath = normalizePath(path); | ||
var canWrite = checkPath(normalizedPath, writePaths); | ||
logger.trace(() -> Strings.format("checking [%s] (normalized to [%s]) for READ_WRITE: %b", path, normalizedPath, canWrite)); |
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.
nit: we're checking write, READ_WRITE has a slightly different meaning
…com:ldematte/elasticsearch into entitlements/improve-fileaccesstree-logging
We already had logging in FileAccessTree as result of debugging the \\pipe\ failures a while ago; this PR slightly improves the logs to provide more information.
We already had logging in FileAccessTree as result of debugging the \\pipe\ failures a while ago; this PR slightly improves the logs to provide more information.
We already had logging in FileAccessTree as result of debugging the \\pipe\ failures a while ago; this PR slightly improves the logs to provide more information.
We already had logging in FileAccessTree as result of debugging the
\\pipe\
failures a while ago; this PR slightly improves the logs to provide more information.