Skip to content

Use same grpc dependencies.#75

Merged
mashhurs merged 4 commits intomainfrom
align-gprc-deps-versions
Feb 6, 2026
Merged

Use same grpc dependencies.#75
mashhurs merged 4 commits intomainfrom
align-gprc-deps-versions

Conversation

@mashhurs
Copy link
Contributor

@mashhurs mashhurs commented Feb 4, 2026

How to test?

  • Run ./gradlew clean vendor
  • Update Logstash Gemfile gem "logstash-input-google_pubsub", :path => "path/to/logstash-input-google_pubsub/closed-repo"
  • Run Logstash with adding --enable-local-plugin-development arg

@piotrp
Copy link

piotrp commented Feb 4, 2026

Build initially failed due to incorrect version configuration - build.gradle passes relative paths to Java APIs, which is discouraged (as I just learned), and failed on my system because:

To honour the JVM settings for this build a single-use Daemon process will be forked.

Worked after I replaced version Files.readAllLines(Paths.get("version")).first() with version file("version").text.trim() (this also allows to remove Paths import from the top of the file).

Version constraints can be enforced in a simpler way, without hunting down each dependency individually:

dependencies {
    ...
        // All gRPC components must be at the same version to align on the same API interfaces
    implementation(enforcedPlatform('io.grpc:grpc-bom:1.75.0'))
    ...
}

This is shorter and gives me the same output in vendor directory.

@piotrp
Copy link

piotrp commented Feb 4, 2026

Works in my tests 👍

@mashhurs mashhurs marked this pull request as ready for review February 4, 2026 21:41
@mashhurs
Copy link
Contributor Author

mashhurs commented Feb 4, 2026

Works in my tests 👍

Excellent! Thank you alot.

@mashhurs mashhurs linked an issue Feb 4, 2026 that may be closed by this pull request
implementation('com.google.protobuf:protobuf-java-util:3.25.5')
implementation('com.google.protobuf:protobuf-javalite:4.29.3')

// All gRPC components must be at the same version to align on the same API interfaces
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we split the version out in to a variable so that we can manage it all in the same place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, thank you for catching up. Completely forgot jumping to add more specs.
Just separated the common version with var.

@mashhurs mashhurs requested a review from donoghuc February 6, 2026 19:20
Copy link
Contributor

@donoghuc donoghuc left a comment

Choose a reason for hiding this comment

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

LGTM!

@mashhurs mashhurs merged commit d8fef1c into main Feb 6, 2026
4 checks passed
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.

Add sophisticated unit test cases. Version 1.4.1 fails to start with Logstash 8.16.2

3 participants