Skip to content

[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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ldematte
Copy link
Contributor

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.

@ldematte ldematte added >non-issue auto-backport Automatically create backport pull requests when merged v8.18.1 v8.19.0 v9.0.1 v9.1.0 :Core/Infra/Entitlements Entitlements infrastructure labels Apr 18, 2025
@ldematte ldematte requested a review from a team as a code owner April 18, 2025 09:41
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Apr 18, 2025
Copy link
Member

@rjernst rjernst left a 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.

@ldematte
Copy link
Contributor Author

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.

@rjernst
Copy link
Member

rjernst commented Apr 18, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Core/Infra/Entitlements Entitlements infrastructure >non-issue Team:Core/Infra Meta label for core/infra team v8.18.1 v8.19.0 v9.0.1 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants