Skip to content
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

Muzzle check plugin should verify that TypeInstrumentations are applied #2780

Open
mateuszrzeszutek opened this issue Apr 12, 2021 · 0 comments
Labels
area:build Issues about build infra, both local and central enhancement New feature or request

Comments

@mateuszrzeszutek
Copy link
Member

Is your feature request related to a problem? Please describe.
Currently when running the muzzle task we verify that the generated ReferenceMatcher and the classLoaderMatcher() match the library classloader (for each tested version). We do not verify the TypeInstrumentation typeMatcher() and transformers() method matchers whatsoever.
This leads to unfortunate findings that parts of our instrumentation actually do not work for some library versions (for example netty-4.0 AbstractChannelHandlerContextInstrumentation).

Describe the solution you'd like
The muzzle check gradle plugin should execute TypeInstrumentation matchers and check if they're applied at least once.
Since this pretty much requires iterating over every class in the application classloader this verification MUST NOT run in the javaagent runtime, this should be a gradle-only feature that only executes during build time.

Additional context
Mentioned in: #536

Does muzzle fail if an Instrumentation doesn't match anything? E.g. seems it doesn't fail if it doesn't match, see running muzzle against elasticsearch 7 doesn't fail Elasticsearch6TransportClientInstrumentation even though Action class doesn't exist anymore

@mateuszrzeszutek mateuszrzeszutek added enhancement New feature or request area:build Issues about build infra, both local and central labels Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:build Issues about build infra, both local and central enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant