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

Generate opentelemetry-javaagent "-all" artifact during "assemble" #708

Closed
trask opened this issue Jul 15, 2020 · 7 comments · Fixed by #1645
Closed

Generate opentelemetry-javaagent "-all" artifact during "assemble" #708

trask opened this issue Jul 15, 2020 · 7 comments · Fixed by #1645
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 contributor experience Something that we can do to improve the experience of contributors (especially new contributors)

Comments

@trask
Copy link
Member

trask commented Jul 15, 2020

Currently

./gradlew assemble

does not generate the -all artifact.

Should we generate the -all artifact during assemble? (EDIT: based on @anuraaga's feedback below: yes!)

#707 is fixing CONTRIBUTING.md to accurately reflect the current state, but if we make this change then we can simplify CONTRIBUTING.md back to just running assemble in the future.

@anuraaga
Copy link
Contributor

anuraaga commented Jul 16, 2020

I think we should - I work on this repo and even then every time I do assemble, hrm?, unzip -L, hrm?, oh shadowJar.

@trask trask changed the title Generate opentelemetry-javaagent "-all" artifact during "assemble"? Generate opentelemetry-javaagent "-all" artifact during "assemble" Jul 16, 2020
@trask trask added contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome contributor experience Something that we can do to improve the experience of contributors (especially new contributors) labels Jul 16, 2020
@iNikem iNikem added release:required-for-ga area:build Issues about build infra, both local and central labels Jul 22, 2020
@trask
Copy link
Member Author

trask commented Aug 17, 2020

I tried adding the obvious to the bottom of javaagent.gradle:

assemble.dependsOn lightShadow
assemble.dependsOn shadowJar

and it works great with ./gradlew :javaagent:assemble:

  9180430 Aug 16 22:33 opentelemetry-javaagent-0.8.0-SNAPSHOT.jar
 25247132 Aug 16 22:33 opentelemetry-javaagent-0.8.0-SNAPSHOT-all.jar
   399555 Aug 16 22:33 opentelemetry-javaagent-0.8.0-SNAPSHOT-javadoc.jar
     3730 Aug 16 22:33 opentelemetry-javaagent-0.8.0-SNAPSHOT-sources.jar

@trask
Copy link
Member Author

trask commented Aug 17, 2020

Ooops, hit comment too soon:

but it doesn't work with ./gradlew assemble:

 9180430 Aug 16 22:36 opentelemetry-javaagent-0.8.0-SNAPSHOT.jar
 9180705 Aug 16 22:36 opentelemetry-javaagent-0.8.0-SNAPSHOT-all.jar
  399555 Aug 16 22:36 opentelemetry-javaagent-0.8.0-SNAPSHOT-javadoc.jar
    3730 Aug 16 22:36 opentelemetry-javaagent-0.8.0-SNAPSHOT-sources.jar

(note size of -all artifact in this case)

@anuraaga
Copy link
Contributor

I think we may be able to use the shadow jar publishing configuration since we publish both unshaded and shaded

https://imperceptiblethoughts.com/shadow/publishing/

@anuraaga
Copy link
Contributor

Oh but guess that's only publish, not assemble. Hmm - what's lightshadow? :)

@trask
Copy link
Member Author

trask commented Aug 17, 2020

what's lightshadow?

shadow, but without the exporters, therefore light shadow 😄

@anuraaga
Copy link
Contributor

Ah ok - hmm I'd expect problems with the light shadow (no classifier) but surprised to see a problem with the all one.

For replacing a jar with shadow, I always use this pattern to disable the jar task and have it depend on the shadow task (s)
https://github.com/anuraaga/aws-opentelemetry-java-instrumentation/blob/master/otelagent/build.gradle.kts#L65

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 contributor experience Something that we can do to improve the experience of contributors (especially new contributors)
Projects
None yet
3 participants