Skip to content

Revert "KAFKA-16803: Change fork, update ShadowJavaPlugin to 8.1.7 (#16295)"#17218

Merged
cmccabe merged 1 commit intoapache:3.9from
cmccabe:3.9_revert_KAFKA-16803
Sep 17, 2024
Merged

Revert "KAFKA-16803: Change fork, update ShadowJavaPlugin to 8.1.7 (#16295)"#17218
cmccabe merged 1 commit intoapache:3.9from
cmccabe:3.9_revert_KAFKA-16803

Conversation

@cmccabe
Copy link
Contributor

@cmccabe cmccabe commented Sep 17, 2024

Revert "KAFKA-16803: Change fork, update ShadowJavaPlugin to 8.1.7 (#16295)"

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.

…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.
Copy link
Member

@mumrah mumrah left a comment

Choose a reason for hiding this comment

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

LGTM

@cmccabe cmccabe merged commit 389a8d8 into apache:3.9 Sep 17, 2024
dajac pushed a commit that referenced this pull request Feb 22, 2025
…16295)" (#19000)

The PR: #16295 which changed the
shadow plugin version has re-introduced the issue with publication of
signed jars, fixed in: #15308.

This PR reverts #16295 to unblock
Kafka 4.0 release. And we should aim for fixing the issue permanently as
being discussed here: #18018.

Seems same issue was encountered during `Kafka-3.9` release and same
commit was reverted in 3.9 as well:
#17218.

Reviewers: David Jacot <[email protected]>
mumrah pushed a commit that referenced this pull request Mar 12, 2025
**Prologue (related PR's):**
-  #16295
-  #17218
-  #16489 

**Action points:**
- switch shadow plugin from `io.github.goooler.shadow` to
`com.gradleup.shadow`
- upgrade plugin version from **8.1.3** to **8.3.5** (release notes:
https://gradleup.com/shadow/changes/#v8-3-5-2024-11-03)

**Rationale:** both previous one and currently used shadow plugins are
now deprecated (in favor of `com.gradleup.shadow`):
- `com.github.johnrengelman.shadow` maintenance was transferred to
`com.gradleup.shadow`:
https://github.com/GradleUp/shadow/tree/8.3.5?tab=readme-ov-file#gradle-shadow
- `io.github.goooler.shadow`: changes are ported to
`com.gradleup.shadow`:
https://github.com/Goooler/shadow?tab=readme-ov-file#gradle-shadow

**Pitfall (to keep in mind):** 
- #15532 

Co-authored-by: Goooler <[email protected]>
Reviewers: Apoorv Mittal <[email protected]>, David Arthur <[email protected]>
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.

2 participants