Skip to content

Conversation

onobc
Copy link
Contributor

@onobc onobc commented Sep 20, 2025

Add Spring gRPC support

This commit introduces support for Spring gRPC by moving the autoconfiguration, test, and starter modules from Spring gRPC to Spring Boot (here).

Note

The relevant docs from Spring gRPC are not included in this proposal (will be in a subsequent PR).

Here is a list of things to consider adding after this proposal is merged:

Must haves

  • (required) Add docs (we will handle this as we are familiar w/ the content that is currently in the Spring gRPC docs)
  • (Improvement) get hardcoded grpc/proto version out of grpc smoke test
  • (Improvement) add aggregate server enabled to ConditionalOnGrpcServerEnavled (e.g. spring.grpc.server.(|reflection|health|observation).enabled
  • (Improvement) if we do not do the above (agg server enabled) we should rename COGSE because it is already also checking COC(BindableService) + property not set to false
  • (Improvement) server autoconfig more coarse-grained (too many top-level guards and it reminds me of the pain I have had as an external user when trying to disable autoconfig via properties for say Elasticsearch where there is like 10 magic ACs that you have to find to do this
  • (Improvement) Beef up tests for grpc test components in spring-boot-test-autoconfigure module
    • @LocalGrpcPort
    • ServerPortInfoApplicationContextInitializer
    • InProcessTransportContextCustomizerFactory
    • @AutoConfigureInProcessTransport
      • Without @ACIPT neither AC nor IPTCC fires
      • With @ACIPT(true|) AC and IPTCC fires
      • With @ACIPT(false) neither AC nor IPTCC fires
      • With @ACIPT(true|) user can set enabled prop to false and neither AC nor IPTCC fires

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 20, 2025
exclude "smoketest/grpc/proto"
}

// FIXME get from 'protobuf-java-version' from dep mgmt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I were doing this test outside of Spring Boot I would use dependencyManagement.importedProperties. I banged on this for at least an hour and cut my losses and figured the reviewer will know a simple way to do this.

This commit introduces support for Spring gRPC by moving the
autoconfiguration, test, and starter modules from Spring gRPC
to Spring Boot (here).

The relavant docs from Spring gRPC are not included in this
commit and will be available in a subsequent commit.

Signed-off-by: onobc <[email protected]>
Updates the following gRPC related library versions:

- `grpc-bom` from `1.74.0` to `1.75.0`
- `protobuf-bum` from `4.31.1` to `4.32.1`

Signed-off-by: onobc <[email protected]>
This updates the gRPC Kotlin version from `1.4.3` to `1.5.0`

Signed-off-by: onobc <[email protected]>
Updates the gRPC and protobuf versions in the gRPC smoke test:

- `grpc-bom` from `1.74.0` to `1.75.0`
- `protobuf-bum` from `4.31.1` to `4.32.1`

Signed-off-by: onobc <[email protected]>
@onobc onobc force-pushed the cbono-grpc-autoconfig-springgrpc-GH-234 branch from f851804 to a4e4d21 Compare September 22, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants