GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [fix][misc] Class conflict during jetcd-core-shaded shading process by Shawyeok · Pull Request #23641 · apache/pulsar

Conversation

@Shawyeok

@Shawyeok Shawyeok commented Nov 26, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Motivation

In the latest release candidates (3.0.8-candidate-1, 4.0.1-candidate-1), the jetcd-core-shaded module shading issue persists. This occurs because the maven-shade-plugin includes the current project artifact in the shade process. In jetcd-core-shaded, we copy io.etcd.jetcd.* into the jetcd-core-shaded jar without relocation. As a result, when the install or deploy goals are executed without cleaning the target folder, class conflicts arise between io.etcd.jetcd.* inside org.apache.pulsar:jetcd-core-shaded.jar and io.etcd:jetcd-core.jar.

#23604 attempted to resolve this issue but failed to account for build and deploy in separate steps during the release process.

Verifying this Change

To verify this patch, follow these steps:

# Step 1: Clean and install the `jetcd-core-shaded` module.
mvn clean install -pl jetcd-core-shaded -DskipTests

# Step 2: Install without cleaning, simulating a release process.
mvn install -pl jetcd-core-shaded -DskipTests

# Step 3: Unpack the shaded jar into a directory and verify imports.
# Ensure that the import statement for `io.netty.handler.logging.ByteBufFormat` 
# in `org/apache/pulsar/jetcd/shaded/io/vertx/core/net/NetClientOptions.class` 
# is correct. The expected import is:
# `import io.grpc.netty.shaded.io.netty.handler.logging.ByteBufFormat;`.
unzip $M2_REPO/org/apache/pulsar/jetcd-core-shaded/<VERSION>/jetcd-core-shaded-<VERSION>-shaded.jar \
  -d jetcd-core-shaded/target/shaded-classes

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: Shawyeok#20

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Shawyeok
[fix][misc] Adjust jetcd-core-shaded shading configuration to be able…
1ae35b5
… to execute shade multiple times without clean
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Nov 26, 2024
@Shawyeok Shawyeok changed the title [fix][misc] Adjust jetcd-core-shaded shading configuration to be able to execute shade multiple times without clean [fix][misc] Class conflict during jetcd-core-shaded shading process Nov 26, 2024
@lhotari lhotari added release/3.3.3 release/3.0.8 release/4.0.1 labels Nov 26, 2024
lhotari
lhotari approved these changes Nov 26, 2024
View reviewed changes

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM. Good work @Shawyeok. Thanks for finding the root cause and addressing the problem.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lhotari

lhotari commented Nov 26, 2024

Copy link
Copy Markdown
Member

@Shawyeok Please submit a similar PR to BookKeeper for jetcd-core-shaded.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lhotari
lhotari merged commit 3e108da into apache:master Nov 26, 2024
lhotari pushed a commit that referenced this pull request Nov 27, 2024
@Shawyeok @lhotari
[fix][misc] Class conflict during jetcd-core-shaded shading process (#…
0d3e4f6
…23641)

(cherry picked from commit 3e108da)
@lhotari lhotari added the cherry-picked/branch-4.0 label Nov 27, 2024
lhotari pushed a commit that referenced this pull request Nov 27, 2024
@Shawyeok @lhotari
[fix][misc] Class conflict during jetcd-core-shaded shading process (#…
6c33bf1
…23641)

(cherry picked from commit 3e108da)
@lhotari lhotari added the cherry-picked/branch-3.0 label Nov 27, 2024
@Shawyeok
Shawyeok deleted the fix-jetcd-core-shading-issue-2 branch November 27, 2024 14:56
lhotari pushed a commit that referenced this pull request Nov 27, 2024
@Shawyeok @lhotari
[fix][misc] Class conflict during jetcd-core-shaded shading process (#…
4e7033b
…23641)

(cherry picked from commit 3e108da)
@lhotari lhotari added the cherry-picked/branch-3.3 label Nov 27, 2024
@Shawyeok

Shawyeok commented Nov 28, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@Shawyeok Please submit a similar PR to BookKeeper for jetcd-core-shaded.

@lhotari
apache/bookkeeper#4532 please feel free to take a look, thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 28, 2024
@Shawyeok @nikhil-ctds
[fix][misc] Class conflict during jetcd-core-shaded shading process (a…
d102c4b
…pache#23641)

(cherry picked from commit 3e108da)
(cherry picked from commit 6c33bf1)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 28, 2024
@Shawyeok @srinath-ctds
[fix][misc] Class conflict during jetcd-core-shaded shading process (a…
592b4b0
…pache#23641)

(cherry picked from commit 3e108da)
(cherry picked from commit 6c33bf1)
@lhotari lhotari mentioned this pull request Jan 13, 2025
[improve][misc] Upgrade to Netty 4.1.111.Final and switch to use grpc-netty-shaded #22892
Merged
1 of 4 tasks
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
@Shawyeok hanmz
[fix][misc] Class conflict during jetcd-core-shaded shading process (a…
0e6392b
…pache#23641)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lhotari lhotari lhotari approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cherry-picked/branch-3.0 cherry-picked/branch-3.3 cherry-picked/branch-4.0 doc-not-needed Your PR changes do not impact docs release/3.0.8 release/3.3.3 release/4.0.1

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Shawyeok @lhotari
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.