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

Run muzzle check against OpenTelemetry API instrumentation (bridge) #4797

Merged
merged 5 commits into from
Dec 6, 2021

Conversation

trask
Copy link
Member

@trask trask commented Dec 4, 2021

Addresses part of #3044

This PR changes muzzle checks to run against shaded artifacts (similar to how tests are run against shaded artifacts). The main reason for doing this is to enable running muzzle checks against OpenTelemetry API instrumentation.

This will help unblock PR #4786 which is currently failing on :instrumentation:reactor-3.1:javaagent:muzzle due to java.lang.ClassNotFoundException: application.io.opentelemetry.context.ContextStorage

@trask trask force-pushed the run-muzzle-check-against-bridge branch 4 times, most recently from 35b53c5 to 22f130d Compare December 5, 2021 01:05
@trask trask changed the title Run muzzle check against bridge Run muzzle check against OpenTelemetry API instrumentation (bridge) Dec 5, 2021
@trask trask force-pushed the run-muzzle-check-against-bridge branch from 22f130d to 05a7827 Compare December 5, 2021 03:35
@trask trask force-pushed the run-muzzle-check-against-bridge branch from 05a7827 to 73bddb3 Compare December 5, 2021 04:09
@trask trask marked this pull request as ready for review December 5, 2021 05:33
val muzzleShadow by tasks.registering(ShadowJar::class) {
from(tasks.jar.get().archiveFile.get())

configurations = listOf(project.configurations.runtimeClasspath.get())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is default, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaults are only applied to the default "shadowJar" task, see johnrengelman/shadow#108 (comment)

val muzzleBootstrap: Configuration by configurations.creating {
isCanBeConsumed = false
isCanBeResolved = true
}

val muzzleShadow by tasks.registering(ShadowJar::class) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this shadow jar is needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shades the javaagent module classes themselves

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename it to shadedModule then? Or something similar. We don't shade muzzle here, do we?

@trask trask merged commit 3801bb3 into open-telemetry:main Dec 6, 2021
@trask trask deleted the run-muzzle-check-against-bridge branch December 6, 2021 19:58
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants