Skip to content

Java: Shadow protobuf dependency - #2931

Merged
Yury-Fridlyand merged 12 commits into
mainfrom
java/shadow
Jan 17, 2025
Merged

Yury-Fridlyand merged 12 commits into
mainfrom
java/shadow

Conversation

@Yury-Fridlyand

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

Copy link
Copy Markdown
  • 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 <yury.fridlyand@improving.com>
@Yury-Fridlyand Yury-Fridlyand added java ☕ issues and fixes related to the java client dependency 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 <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@Yury-Fridlyand

Copy link
Copy Markdown
Author

fix publication

@yipin-chen yipin-chen left a comment

Copy link
Copy Markdown
Collaborator

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

Yury-Fridlyand commented Jan 10, 2025

Copy link
Copy Markdown
Author

include netty dependency

I don't include it. Should I?

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@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

ikolomi commented Jan 16, 2025

Copy link
Copy Markdown
Contributor

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

Comment thread .github/workflows/ort.yml
distribution: "temurin"
java-version: 11

- name: Install protoc (protobuf)

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@Yury-Fridlyand
Yury-Fridlyand merged commit 65667f4 into main Jan 17, 2025
@Yury-Fridlyand
Yury-Fridlyand deleted the java/shadow branch January 17, 2025 21:32
Maayanshani25 pushed a commit to Maayanshani25/valkey-glide that referenced this pull request Jan 19, 2025
* Shadow protobuf

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
edlng pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jan 20, 2025
* Shadow protobuf

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Edward Liang <edward.liang@improving.com>
barshaul pushed a commit to barshaul/glide-for-redis that referenced this pull request Jan 28, 2025
* Shadow protobuf

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
liorsve pushed a commit to liorsve/valkey-glide that referenced this pull request Mar 30, 2025
* Shadow protobuf

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Yury-Fridlyand added a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 6, 2025
* Shadow protobuf

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Edward Liang <edward.liang@improving.com>
affonsov pushed a commit that referenced this pull request Aug 21, 2026
* Shadow protobuf

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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