Agreed. Hopefully something simple on our end.
from tctl:
“serverVersion”: “1.5.1”
from go.mod:
go.temporal.io/api v1.4.0
go.temporal.io/sdk v1.4.1
Sample parent and child:
func SampleChildWorkflow(ctx workflow.Context, name string) (string, error) {
ao := workflow.ActivityOptions{
StartToCloseTimeout: time.Minute * 1,
HeartbeatTimeout: time.Second * 9,
WaitForCancellation: true,
ActivityID: "sample-activity-id",
}
ctx = workflow.WithActivityOptions(ctx, ao)
var greeting string
err := workflow.ExecuteActivity(ctx, GreetingActivity, name).Get(ctx, &greeting)
return greeting, err
}
func GreetingActivity(ctx context.Context, name string) (string, error) {
greeting := "Hello " + name + "!"
return greeting, nil
}
func SampleParentWorkflow(ctx workflow.Context, name string) (string, error) {
logger := workflow.GetLogger(ctx)
// Removing these two lines produces expected results
cwo := workflow.ChildWorkflowOptions{}
ctx = workflow.WithChildOptions(ctx, cwo)
var result string
err := workflow.ExecuteChildWorkflow(ctx, SampleChildWorkflow, name).Get(ctx, &result)
if err != nil {
logger.Error("Parent execution received child execution failure.", "Error", err)
return "", err
}
logger.Info("Parent execution completed.", "Result", result)
return result, nil
}
Heartbeat Timeout not set in history, but other fields are like StartToClose and ActivityID: