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

Build and publish muzzle check plugin separately #1225

Closed
iNikem opened this issue Sep 20, 2020 · 8 comments
Closed

Build and publish muzzle check plugin separately #1225

iNikem opened this issue Sep 20, 2020 · 8 comments
Assignees
Labels
area:build Issues about build infra, both local and central contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request

Comments

@iNikem
Copy link
Contributor

iNikem commented Sep 20, 2020

When trying to run muzzle in parallel in GHA, building projects buildSrc takes 2/3 of each task execution. This is total waste of time. Should build it once, publish and consume externally.

@iNikem iNikem added enhancement New feature or request release:after-ga area:build Issues about build infra, both local and central labels Sep 20, 2020
@iNikem
Copy link
Contributor Author

iNikem commented Oct 6, 2020

Damn :( muzzle plugin, living inside buildSrc, reaches to javaagent-bootstrap and javaagent-tooling to grab their runtime classpaths :( This makes extracting plugin almost impossible :(

@pavolloffay
Copy link
Member

Is there any way how it could be done? I am happy to help with this.

@iNikem
Copy link
Contributor Author

iNikem commented Oct 7, 2020

I don't know one right now.

@iNikem iNikem added the contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome label Oct 8, 2020
@pavolloffay
Copy link
Member

@iNikem Is this the problem?

def bootstrapProject = project.rootProject.getChildProjects().get('javaagent-bootstrap')
def toolingProject = project.rootProject.getChildProjects().get('javaagent-tooling')

I would like to use the muzzle plugin in a custom build with added instrumentations. The muzzle would be very helpful there.

@iNikem
Copy link
Contributor Author

iNikem commented Oct 14, 2020

Yes, this is it.

@pavolloffay
Copy link
Member

Commenting from #1408

The muzzle task could expose a property to configure classpath with javaagent-tooling and javaagent-bootstrap artifacts. E.g something similar to what ByteBuddy plugin does
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/master/gradle/instrumentation.gradle#L36

  byteBuddy {
    transformation {
      tasks = ['compileJava', 'compileScala', 'compileKotlin']
      plugin = 'io.opentelemetry.javaagent.tooling.muzzle.collector.MuzzleCodeGenerationPlugin'
      classPath = project(':javaagent-tooling').configurations.instrumentationMuzzle + configurations.runtimeClasspath + sourceSets.main.output
    }
  }

@mateuszrzeszutek mateuszrzeszutek changed the title Build and publish muzzle plugin separately Build and publish muzzle check plugin separately Apr 12, 2021
@mateuszrzeszutek
Copy link
Member

A bit of clarification: this issue concerns the muzzle check plugin (MuzzlePlugin currently), not the muzzle compile one - there's a separate issue for the muzzle compile plugin extraction.

@iNikem
Copy link
Contributor Author

iNikem commented Aug 13, 2021

Done

@iNikem iNikem closed this as completed Aug 13, 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 contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants