-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[Entitlements] Instrumentation for FileSystemProvider #122232
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] Instrumentation for FileSystemProvider #122232
Conversation
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
| FileAttribute<?>... attrs | ||
| ); | ||
|
|
||
| void checkNewDirectoryStream(Class<?> callerClass, FileSystemProvider that, Path dir, DirectoryStream.Filter<? super Path> filter); |
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.
Wow, this is a large number of special-case check methods. If we had check inheritance, would that make these unnecessary?
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.
Well, we will have these anyway! We would just not need the 25 lines or so in EntitlementInitialization that wire them up to the correct class, so not such a big difference.
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, @prdoyle any more comments from your side?
|
|
||
| private static ElasticsearchEntitlementChecker manager; | ||
|
|
||
| interface InstrumentationInfoFunction { |
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.
optional nit: InstrumentationInfoFactory?
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.
Thanks! I always appreciate a good name suggestion :)
💔 Backport failed
You can use sqren/backport to manually backport by running |
…22232) (elastic#122471) * [Entitlements] Instrumentation for FileSystemProvider (elastic#122232) * Move some check function and tests to version specific checker classes * Refactor/fix: lookupImplementationMethod looks up the class hierarchy too * Spotless
This PR adds entitlement instrumentation for
FileSystemProvider; we instrument the concrete class obtained at runtime fromFileSystem.default().Relates to ES-10793