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

[fix] Used unshaded netty buffer classes in pulsar-client shading test #24000

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

merlimat
Copy link
Contributor

Motivation

The shading test is using Netty classes from the shaded artifact. This is wrong and it causes issues when loading the project in IDEs.

Instead, we should add a test-scoped dependency on Netty-buffer.

Modifications

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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:

@merlimat merlimat added this to the 4.1.0 milestone Feb 18, 2025
@merlimat merlimat self-assigned this Feb 18, 2025
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Feb 18, 2025
@lhotari
Copy link
Member

lhotari commented Feb 20, 2025

There seems to be a compilation error with the changes

  [INFO] -------------------------------------------------------------
  Error:  COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  Error:  /home/runner/work/pulsar/pulsar/tests/pulsar-client-all-shade-test/src/test/java/org/apache/pulsar/tests/integration/SimpleProducerConsumerTest.java:[589,74] incompatible types: io.netty.buffer.ByteBuf cannot be converted to org.apache.pulsar.shade.io.netty.buffer.ByteBuf
  Error:  /home/runner/work/pulsar/pulsar/tests/pulsar-client-all-shade-test/src/test/java/org/apache/pulsar/tests/integration/SimpleProducerConsumerTest.java:[593,76] incompatible types: io.netty.buffer.ByteBuf cannot be converted to org.apache.pulsar.shade.io.netty.buffer.ByteBuf

Since the problem to solve is about IDE usage, one way to get around the IDE issue is to disable the integrationTests profile in IntelliJ.

image

Another solution is to run the build on the command line to first build the shaded libraries.

In IntelliJ development another way to speed up development is to uncheck the main profile and check core-modules profile so that only the core modules are enabled in IntelliJ. This is described in https://pulsar.apache.org/contribute/setup-ide/#further-configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants