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

Java: Shadow protobuf dependency #2931

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Java: Shadow protobuf dependency #2931

wants to merge 12 commits into from

Conversation

Yury-Fridlyand
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand commented Jan 9, 2025

  • Shadow dependency
  • Build artifact for publishing and testing
  • Use artifact in tests
  • Validate dependencies
./gradlew publishToMavenLocal

publishes package to the local maven cache using default version:

$> ls -1 ~/.m2/repository/io/valkey/valkey-glide/255.255.255/
valkey-glide-255.255.255-javadoc.jar
valkey-glide-255.255.255-linux-x86_64.jar
valkey-glide-255.255.255-sources.jar
valkey-glide-255.255.255.module
valkey-glide-255.255.255.pom

There are these files:
valkey-glide-255.255.255.module.txt
valkey-glide-255.255.255.pom.txt
valkey-glide-255.255.255-javadoc.zip
valkey-glide-255.255.255-linux-x86_64.zip
valkey-glide-255.255.255-sources.zip
(I changed the extensions, because GH does not allow to upload jar and others)

Issue link

This Pull Request is linked to issue (URL): #2804
Fixes #2947 and #2961

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Destination branch is correct - main or release
  • Commits will be squashed upon merging.

Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand Yury-Fridlyand added java issues and fixes related to the java client dependency Dependency management labels Jan 9, 2025
@Yury-Fridlyand Yury-Fridlyand requested a review from a team as a code owner January 9, 2025 01:21
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand
Copy link
Collaborator Author

fix publication

Copy link
Collaborator

@yipin-chen yipin-chen left a comment

Choose a reason for hiding this comment

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

LGTM, since you also include netty dependency, do you consider changing the title of this PR to `Java: Shadow protobuf and netty dependencies"?

@Yury-Fridlyand Yury-Fridlyand marked this pull request as draft January 10, 2025 19:57
@Yury-Fridlyand
Copy link
Collaborator Author

Yury-Fridlyand commented Jan 10, 2025

include netty dependency

I don't include it. Should I?

Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand Yury-Fridlyand marked this pull request as ready for review January 10, 2025 21:28
@Yury-Fridlyand Yury-Fridlyand linked an issue Jan 13, 2025 that may be closed by this pull request
2 tasks
@yipin-chen yipin-chen requested a review from avifenesh January 14, 2025 06:25
@ikolomi
Copy link
Collaborator

ikolomi commented Jan 16, 2025

@Yury-Fridlyand why there are these file attachment to this PR (the zip files)?

@@ -158,6 +158,17 @@ jobs:
distribution: "temurin"
java-version: 11

- name: Install protoc (protobuf)
Copy link
Collaborator

Choose a reason for hiding this comment

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

how come shadowing java bindings has an effect on ORT third party tool?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed IT to use the generated module instead of client sources. Without these changes, ORT tool was failing:

02:36:38.314 [DefaultDispatcher-worker-2] ERROR org.ossreviewtoolkit.plugins.packagemanagers.gradleinspector.GradleInspector - Could not find io.valkey:valkey-glide:255.255.255.
Searched in the following locations:
  - https://repo.maven.apache.org/maven2/io/valkey/valkey-glide/255.255.255/valkey-glide-255.255.255.pom
  - file:/home/runner/.m2/repository/io/valkey/valkey-glide/255.255.255/valkey-glide-255.255.255.pom from project :integTest.
02:36:38.322 [DefaultDispatcher-worker-2] ERROR org.ossreviewtoolkit.plugins.packagemanagers.gradleinspector.GradleInspector - Could not find io.valkey:valkey-glide:255.255.255 from project :integTest.

@Yury-Fridlyand
Copy link
Collaborator Author

@Yury-Fridlyand why there are these file attachment to this PR (the zip files)?

In order to review and verify the updated java client module.

@Yury-Fridlyand Yury-Fridlyand linked an issue Jan 16, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Dependency management java issues and fixes related to the java client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Protobuf 3.25.5 support for Quarkus Compatibility User request: shadow protobuf dependency in java client
4 participants