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 checks transitive dependencies which causes confusing errors #798

Closed
anuraaga opened this issue Jul 27, 2020 · 5 comments
Closed

Comments

@anuraaga
Copy link
Contributor

For example, jetty-8.0 depends on servlet-3.0. If there is a problem in the muzzle configuration of servlet-3.0, it is the jetty-8.0 muzzle task that complains which is deceptive

> Task :instrumentation:jetty-8.0:muzzle-AssertPass-org.eclipse.jetty-jetty-server-9.4.11.v20180605 FAILED
FAILED MUZZLE VALIDATION: io.opentelemetry.auto.instrumentation.servlet.v3_0.Servlet3Instrumentation mismatches:
-- io.opentelemetry.auto.instrumentation.servlet.v3_0.CountingHttpServletRequest:34 Missing class io.opentelemetry.auto.instrumentation.servlet.v3_0.CountingHttpServletRequest

Neet to be very careful in looking at the class name Servlet3Instrumentation in that log, but it would be nicer if transitive was just not checked since it'll be checked by other muzzle tasks anyways.

@trask
Copy link
Member

trask commented Apr 3, 2021

@anuraaga can we close this now that the helper class list is auto-generated?

@anuraaga
Copy link
Contributor Author

anuraaga commented Apr 4, 2021

It's much harder to fail muzzle indeed. I think if it's possible it would be nice if muzzle didn't have confusing output for transitive but maybe it's not really feasible.

@mateuszrzeszutek
Copy link
Member

Another case of this happened in #4627

When I included netty-4.1 instrumentation in reactor-netty-1.0 as implementation dependency the muzzle check started failing - that happened because the netty instrumentation module always matched, even if the checked reactor-netty version was supposed to fail.

@trask
Copy link
Member

trask commented May 3, 2022

I ran into this again also, added a new option excludeInstrumentationModule to the muzzle directive to suppress the InstrumentationModule that is brought in via transitive dependency

@mateuszrzeszutek
Copy link
Member

I think we can consider this issue closed by #6044

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants