MINOR: Fix shadow jar publishing for the clients module#15127
Merged
stanislavkozlovski merged 1 commit intoapache:trunkfrom Jan 8, 2024
Merged
MINOR: Fix shadow jar publishing for the clients module#15127stanislavkozlovski merged 1 commit intoapache:trunkfrom
stanislavkozlovski merged 1 commit intoapache:trunkfrom
Conversation
stanislavkozlovski
approved these changes
Jan 4, 2024
Contributor
stanislavkozlovski
left a comment
There was a problem hiding this comment.
Amazing sleuthing! I tested the publish again and confirmed it works!
I don't have an answer to:
I compared the 3.6.1 kafka release artifacts here with generated artifacts in my personal repo, and can find module metadata artifact is missing. Debugged the issue and it seems gradle publish - from components.java actually registers both jar and module for publish which is not there in case of shadowJar hence the question is that do we require to publish module metadata information or are we good?
Who is a good person to ask about this? Maybe some of the original reviewers of the shadow PR?
Contributor
Author
stanislavkozlovski
pushed a commit
that referenced
this pull request
Jan 8, 2024
The PR fixes the publishing of kafka-clients artifact to remote maven. The kafka-clients jar was recently shadowed which would publish the artifacts to the local maven repo successfully but would throw an error when publishing to remote maven. (as part of the release process) The issue triggers only with publishMavenJavaPublicationToMavenRepository due to signing. Generating signed asc files error out for shadowed release artifacts as the module name (clients) differs from the artifact name (kafka-clients). The fix is basically to explicitly define artifact of shadowJar to signing and publish plugin. project.shadow.component(mavenJava) previously outputs the name as client-<version>-all.jar though the classifier and archivesBaseName are already defined correctly in :clients and shadowJar construction.
gaurav-narula
pushed a commit
to gaurav-narula/kafka
that referenced
this pull request
Jan 24, 2024
The PR fixes the publishing of kafka-clients artifact to remote maven. The kafka-clients jar was recently shadowed which would publish the artifacts to the local maven repo successfully but would throw an error when publishing to remote maven. (as part of the release process) The issue triggers only with publishMavenJavaPublicationToMavenRepository due to signing. Generating signed asc files error out for shadowed release artifacts as the module name (clients) differs from the artifact name (kafka-clients). The fix is basically to explicitly define artifact of shadowJar to signing and publish plugin. project.shadow.component(mavenJava) previously outputs the name as client-<version>-all.jar though the classifier and archivesBaseName are already defined correctly in :clients and shadowJar construction.
This was referenced Jan 29, 2024
yyu1993
pushed a commit
to yyu1993/kafka
that referenced
this pull request
Feb 15, 2024
The PR fixes the publishing of kafka-clients artifact to remote maven. The kafka-clients jar was recently shadowed which would publish the artifacts to the local maven repo successfully but would throw an error when publishing to remote maven. (as part of the release process) The issue triggers only with publishMavenJavaPublicationToMavenRepository due to signing. Generating signed asc files error out for shadowed release artifacts as the module name (clients) differs from the artifact name (kafka-clients). The fix is basically to explicitly define artifact of shadowJar to signing and publish plugin. project.shadow.component(mavenJava) previously outputs the name as client-<version>-all.jar though the classifier and archivesBaseName are already defined correctly in :clients and shadowJar construction.
AnatolyPopov
pushed a commit
to aiven/kafka
that referenced
this pull request
Feb 16, 2024
The PR fixes the publishing of kafka-clients artifact to remote maven. The kafka-clients jar was recently shadowed which would publish the artifacts to the local maven repo successfully but would throw an error when publishing to remote maven. (as part of the release process) The issue triggers only with publishMavenJavaPublicationToMavenRepository due to signing. Generating signed asc files error out for shadowed release artifacts as the module name (clients) differs from the artifact name (kafka-clients). The fix is basically to explicitly define artifact of shadowJar to signing and publish plugin. project.shadow.component(mavenJava) previously outputs the name as client-<version>-all.jar though the classifier and archivesBaseName are already defined correctly in :clients and shadowJar construction.
clolov
pushed a commit
to clolov/kafka
that referenced
this pull request
Apr 5, 2024
The PR fixes the publishing of kafka-clients artifact to remote maven. The kafka-clients jar was recently shadowed which would publish the artifacts to the local maven repo successfully but would throw an error when publishing to remote maven. (as part of the release process) The issue triggers only with publishMavenJavaPublicationToMavenRepository due to signing. Generating signed asc files error out for shadowed release artifacts as the module name (clients) differs from the artifact name (kafka-clients). The fix is basically to explicitly define artifact of shadowJar to signing and publish plugin. project.shadow.component(mavenJava) previously outputs the name as client-<version>-all.jar though the classifier and archivesBaseName are already defined correctly in :clients and shadowJar construction.
Phuc-Hong-Tran
pushed a commit
to Phuc-Hong-Tran/kafka
that referenced
this pull request
Jun 6, 2024
The PR fixes the publishing of kafka-clients artifact to remote maven. The kafka-clients jar was recently shadowed which would publish the artifacts to the local maven repo successfully but would throw an error when publishing to remote maven. (as part of the release process) The issue triggers only with publishMavenJavaPublicationToMavenRepository due to signing. Generating signed asc files error out for shadowed release artifacts as the module name (clients) differs from the artifact name (kafka-clients). The fix is basically to explicitly define artifact of shadowJar to signing and publish plugin. project.shadow.component(mavenJava) previously outputs the name as client-<version>-all.jar though the classifier and archivesBaseName are already defined correctly in :clients and shadowJar construction.
cmccabe
added a commit
to cmccabe/kafka
that referenced
this pull request
Sep 17, 2024
…pache#16295)" This reverts commit 391778b. Unfortunately that commit re-introduced bug apache#15127 which prevented the publishing of kafka-clients artifacts to remote maven. As that bug says: The issue triggers only with publishMavenJavaPublicationToMavenRepository due to signing. Generating signed asc files error out for shadowed release artifacts as the module name (clients) differs from the artifact name (kafka-clients). The fix is basically to explicitly define artifact of shadowJar to signing and publish plugin. project.shadow.component(mavenJava) previously outputs the name as client-<version>-all.jar though the classifier and archivesBaseName are already defined correctly in :clients and shadowJar construction.
cmccabe
added a commit
that referenced
this pull request
Sep 17, 2024
…16295)" (#17218) This reverts commit 391778b. Unfortunately that commit re-introduced bug #15127 which prevented the publishing of kafka-clients artifacts to remote maven. As that bug says: The issue triggers only with publishMavenJavaPublicationToMavenRepository due to signing. Generating signed asc files error out for shadowed release artifacts as the module name (clients) differs from the artifact name (kafka-clients). The fix is basically to explicitly define artifact of shadowJar to signing and publish plugin. project.shadow.component(mavenJava) previously outputs the name as client-<version>-all.jar though the classifier and archivesBaseName are already defined correctly in :clients and shadowJar construction. Reviewers: David Arthur <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The PR fixes the publishing of
kafka-clientsartifact to remote maven. Thekafka-clientsjar is recently been shadowed which does publish the artifacts to local maven successfully but errors when publishing to remote maven. The issue triggers only withpublishMavenJavaPublicationToMavenRepositoryandsigningbutpublishToMavenLocalworks correctly with earlier changes. Generating signedascfiles error out for shadowed release artifacts as the module name (clients) differs from the artifact name (kafka-clients).The fix is basically to explicitly define
artifactofshadowJartosigningandpublishplugin.project.shadow.component(mavenJava)previously outputs the name asclient-<version>-all.jarthough theclassifierandarchivesBaseNameare already defined correctly in:clientsandshadowJarconstruction.Below is another way where the artifact details can be overridden post construction in
afterEvaluateto letpublishplugin know about the correctartifactIdbut it doesn't solve thesigningplugin issue wheresigningplugin is unaware ofkafka-client-<version>.jarand skips signing. Forsigningplugin theartifactshould be explicitly defined as well.Tests:
gpgsecrets locally for signing and private maven repo to upload the artifacts. I ran the release pipeline pointing to custom repo and can successfully push thekafka-clientsartifacts.Query:
modulemetadata artifact is missing. Debugged the issue and it seemsgradle publish-from components.javaactually registers bothjarandmodulefor publish which is not there in case ofshadowJarhence the question is that do we require to publishmodulemetadata information or are we good?cc: @stanislavkozlovski @xvrl @AndrewJSchofield
Committer Checklist (excluded from commit message)