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

add log to see if ctx is replay and the log returned by ctx.getLogger() #989

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 1 addition & 53 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,59 +109,7 @@ jobs:
- name: Build sdk
run: ./mvnw compile -q
- name: Install jars
run: ./mvnw install -q
- name: Validate invoke http example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/invoke/http/README.md
- name: Validate invoke grpc example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/invoke/grpc/README.md
- name: Validate tracing example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/tracing/README.md
- name: Validate expection handling example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/exception/README.md
- name: Validate state example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/state/README.md
- name: Validate pubsub example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/pubsub/README.md
- name: Validate bindings HTTP example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/bindings/http/README.md
- name: Validate secrets example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/secrets/README.md
- name: Validate unit testing example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/unittesting/README.md
- name: Validate Configuration gRPC API example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/configuration/grpc/README.md
- name: Validate Configuration HTTP API example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/configuration/http/README.md
- name: Validate actors example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/actors/README.md
- name: Validate query state HTTP example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/querystate/README.md
run: ./mvnw install -q -DskipTests=true
- name: Validate workflows example
working-directory: ./examples
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ public class DemoSubWorkflow extends Workflow {
@Override
public WorkflowStub create() {
return ctx -> {

System.out.println("[sysout]subflow.ctx.isReplaying()=" + ctx.isReplaying()
+ ", instanceId=" + ctx.getInstanceId());
System.out.println("[sysout]subflow.ctx.getLogger().getName(): " + ctx.getLogger().getName()
+ ", instanceId=" + ctx.getInstanceId());

ctx.getLogger().info("Starting SubWorkflow: " + ctx.getName());

var subWorkflowInput = ctx.getInput(String.class);
Expand All @@ -28,6 +34,11 @@ public WorkflowStub create() {
ctx.getLogger().info("SubWorkflow is calling Activity: " + ReverseActivity.class.getName());
String result = ctx.callActivity(ReverseActivity.class.getName(), subWorkflowInput, String.class).await();

System.out.println("[sysout]ctx.isReplaying()=" + ctx.isReplaying()
+ ", instanceId=" + ctx.getInstanceId());
System.out.println("[sysout]ctx.getLogger().getName(): " + ctx.getLogger().getName()
+ ", instanceId=" + ctx.getInstanceId());

ctx.getLogger().info("SubWorkflow finished with: " + result);
ctx.complete(result);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public class DemoWorkflow extends Workflow {
@Override
public WorkflowStub create() {
return ctx -> {
System.out.println("[sysout]ctx.isReplaying()=" + ctx.isReplaying()
+ ", instanceId=" + ctx.getInstanceId());
System.out.println("[sysout]ctx.getLogger().getName(): " + ctx.getLogger().getName()
+ ", instanceId=" + ctx.getInstanceId());

ctx.getLogger().info("Starting Workflow: " + ctx.getName());

var subWorkflowInput = "Hello Dapr Workflow!";
Expand All @@ -28,6 +33,11 @@ public WorkflowStub create() {
var subWorkflowOutput =
ctx.callSubWorkflow(DemoSubWorkflow.class.getName(), subWorkflowInput, String.class).await();

System.out.println("[sysout]ctx.isReplaying()=" + ctx.isReplaying()
+ ", instanceId=" + ctx.getInstanceId());
System.out.println("[sysout]ctx.getLogger().getName(): " + ctx.getLogger().getName()
+ ", instanceId=" + ctx.getInstanceId());

ctx.getLogger().info("subworkflow finished with: " + subWorkflowOutput);
ctx.complete(subWorkflowOutput);
};
Expand Down
Loading