Skip to content

Add gRPC support to the fluent SDK with new DSL#1488

Open
matheusandre1 wants to merge 1 commit into
serverlessworkflow:mainfrom
matheusandre1:issue1484
Open

Add gRPC support to the fluent SDK with new DSL#1488
matheusandre1 wants to merge 1 commit into
serverlessworkflow:mainfrom
matheusandre1:issue1484

Conversation

@matheusandre1

Copy link
Copy Markdown
Contributor

Many thanks for submitting your Pull Request ❤️!

What this PR does / why we need it:

This is Pull Request covers FuncDSL.grpc gaps and I created layers tests here

Additional information (if needed):

Closes: #1484

@matheusandre1 matheusandre1 force-pushed the issue1484 branch 3 times, most recently from d8aad6f to 9c75deb Compare June 26, 2026 03:27
@fjtirado

Copy link
Copy Markdown
Collaborator

@matheusandre1 Is this ready for review?

@matheusandre1 matheusandre1 marked this pull request as ready for review July 1, 2026 22:55
@matheusandre1 matheusandre1 requested a review from fjtirado as a code owner July 1, 2026 22:55
Copilot AI review requested due to automatic review settings July 1, 2026 22:55

Copilot AI left a comment

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.

Pull request overview

Adds fluent-DSL support for defining gRPC call tasks (including a new step-based API in the experimental FuncDSL) and expands the gRPC integration tests to validate both YAML and fluent-built workflows.

Changes:

  • Introduces experimental FuncDSL gRPC call entrypoints (call(...) overloads + grpc() step) and supporting builders/SPIs/configurers.
  • Extends fluent spec task building with an additional grpc overload accepting CallGrpcConfigurer.
  • Updates gRPC impl tests to run both YAML- and fluent-built workflows via parameterized tests.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
impl/test/src/test/java/io/serverlessworkflow/impl/test/grpc/GrpcUnaryTest.java Converts setup/teardown to per-test lifecycle and adds parameterized coverage for YAML vs fluent-built unary gRPC workflow.
impl/test/src/test/java/io/serverlessworkflow/impl/test/grpc/GrpcUnaryArgsExprTest.java Adds parameterized coverage for unary gRPC workflow with argument expressions.
impl/test/src/test/java/io/serverlessworkflow/impl/test/grpc/GrpcServerStreamingTest.java Adds parameterized coverage for server-streaming gRPC workflow (YAML vs fluent).
impl/test/src/test/java/io/serverlessworkflow/impl/test/grpc/GrpcClientStreamingTest.java Adds parameterized coverage for client-streaming gRPC workflow (YAML vs fluent).
impl/test/src/test/java/io/serverlessworkflow/impl/test/grpc/GrpcBiDirectionalStreamingTest.java Adds parameterized coverage for bidi-streaming gRPC workflow (YAML vs fluent).
impl/test/pom.xml Adds test-scoped dependency on the experimental fluent func artifact.
fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/TaskItemListBuilder.java Adds grpc(String, CallGrpcConfigurer) overload in the fluent spec task list builder.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/spi/FuncDoFluent.java Wires gRPC fluent support into the experimental “do” fluent interface.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/spi/CallGrpcFluent.java New SPI interface enabling grpc(...) in experimental func fluent tasks.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/FuncTaskItemListBuilder.java Implements grpc(...) task creation for experimental func task lists.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/FuncDoTaskBuilder.java Adds grpc(...) to the experimental “do” task builder.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/FuncCallGrpcTaskBuilder.java New builder that constructs CallGRPC tasks with default GRPCArguments.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java Adds gRPC call entrypoints and gRPC step factory methods to experimental FuncDSL.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncCallGrpcStep.java New step-based fluent builder for configuring gRPC call tasks in experimental DSL.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/configurers/FuncCallGrpcConfigurer.java New functional configurer type for low-level gRPC call configuration in experimental DSL.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread impl/test/pom.xml Outdated

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.

Comment thread impl/test/src/test/java/io/serverlessworkflow/impl/test/grpc/GrpcUnaryTest.java Outdated
Signed-off-by: Matheus André <matheusandr2@gmail.com>
Copilot AI review requested due to automatic review settings July 2, 2026 01:24

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Comment on lines +172 to +175
public TaskItemListBuilder grpc(String name, CallGrpcConfigurer configurer) {
Consumer<CallGrpcTaskBuilder> consumer = configurer;
return grpc(name, consumer);
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no, maintaining this overload is necessary to ensure consistency with other grpc methods.

Comment on lines +21 to +27
public interface CallGrpcFluent<SELF extends TaskBaseBuilder<SELF>, LIST> {

LIST grpc(String name, Consumer<SELF> itemsConfigurer);

default LIST grpc(Consumer<SELF> itemsConfigurer) {
return this.grpc(null, itemsConfigurer);
}

@matheusandre1 matheusandre1 Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removing this would require changing the hierarchy of the FuncDoFluent types and would break the structure of the other module.

@fjtirado fjtirado requested a review from ricardozanini July 2, 2026 10:27
@fjtirado

fjtirado commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

@ricardozanini Can you review?

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 Fluent DSL Equivalents for gRPC Call Workflows

4 participants