From a2e275098346c854a3d182cc3a21f1ec4c0f1bc3 Mon Sep 17 00:00:00 2001 From: Pablo Chacin Date: Tue, 12 May 2026 18:22:23 +0200 Subject: [PATCH 1/3] return missing metadata fields in grpc client Signed-off-by: Pablo Chacin --- client/client_grpc.go | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/client/client_grpc.go b/client/client_grpc.go index 194a3cc0..403b4aae 100644 --- a/client/client_grpc.go +++ b/client/client_grpc.go @@ -307,17 +307,21 @@ func makeWorkflowMetadata(resp *protos.GetInstanceResponse) (*backend.WorkflowMe if resp.WorkflowState == nil { return nil, fmt.Errorf("workflow state is nil") } + metadata := &backend.WorkflowMetadata{ - InstanceId: resp.WorkflowState.InstanceId, - Name: resp.WorkflowState.Name, - RuntimeStatus: resp.WorkflowState.WorkflowStatus, - Input: resp.WorkflowState.Input, - CustomStatus: resp.WorkflowState.CustomStatus, - Output: resp.WorkflowState.Output, - CreatedAt: resp.WorkflowState.CreatedTimestamp, - LastUpdatedAt: resp.WorkflowState.LastUpdatedTimestamp, - FailureDetails: resp.WorkflowState.FailureDetails, - Version: resp.WorkflowState.Version, + InstanceId: resp.WorkflowState.InstanceId, + Name: resp.WorkflowState.Name, + RuntimeStatus: resp.WorkflowState.WorkflowStatus, + Input: resp.WorkflowState.Input, + CustomStatus: resp.WorkflowState.CustomStatus, + Output: resp.WorkflowState.Output, + CreatedAt: resp.WorkflowState.CreatedTimestamp, + LastUpdatedAt: resp.WorkflowState.LastUpdatedTimestamp, + FailureDetails: resp.WorkflowState.FailureDetails, + Version: resp.WorkflowState.Version, + StartedAt: resp.WorkflowState.StartedAt, + ParentInstanceId: resp.WorkflowState.ParentInstanceId.Value, + ParentAppId: resp.WorkflowState.ParentAppId, } return metadata, nil } From cd63e9af6e7f56fe8016d9e1ba9290d7355c63bf Mon Sep 17 00:00:00 2001 From: Pablo Chacin Date: Tue, 12 May 2026 19:08:53 +0200 Subject: [PATCH 2/3] use getters for safety Signed-off-by: Pablo Chacin --- client/client_grpc.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/client/client_grpc.go b/client/client_grpc.go index 403b4aae..34b2baa9 100644 --- a/client/client_grpc.go +++ b/client/client_grpc.go @@ -308,20 +308,21 @@ func makeWorkflowMetadata(resp *protos.GetInstanceResponse) (*backend.WorkflowMe return nil, fmt.Errorf("workflow state is nil") } + metadata := &backend.WorkflowMetadata{ - InstanceId: resp.WorkflowState.InstanceId, - Name: resp.WorkflowState.Name, - RuntimeStatus: resp.WorkflowState.WorkflowStatus, - Input: resp.WorkflowState.Input, - CustomStatus: resp.WorkflowState.CustomStatus, - Output: resp.WorkflowState.Output, - CreatedAt: resp.WorkflowState.CreatedTimestamp, - LastUpdatedAt: resp.WorkflowState.LastUpdatedTimestamp, - FailureDetails: resp.WorkflowState.FailureDetails, - Version: resp.WorkflowState.Version, - StartedAt: resp.WorkflowState.StartedAt, - ParentInstanceId: resp.WorkflowState.ParentInstanceId.Value, - ParentAppId: resp.WorkflowState.ParentAppId, + InstanceId: resp.GetWorkflowState().GetInstanceId(), + Name: resp.GetWorkflowState().GetName(), + RuntimeStatus: resp.GetWorkflowState().GetWorkflowStatus(), + Input: resp.GetWorkflowState().GetInput(), + CustomStatus: resp.GetWorkflowState().GetCustomStatus(), + Output: resp.GetWorkflowState().GetOutput(), + CreatedAt: resp.GetWorkflowState().GetCreatedTimestamp(), + LastUpdatedAt: resp.GetWorkflowState().GetLastUpdatedTimestamp(), + FailureDetails: resp.GetWorkflowState().GetFailureDetails(), + Version: resp.GetWorkflowState().GetVersion(), + StartedAt: resp.GetWorkflowState().GetStartedAt(), + ParentInstanceId: resp.GetWorkflowState().GetParentInstanceId().GetValue(), + ParentAppId: resp.GetWorkflowState().GetParentAppId(), } return metadata, nil } From e853b44e5c415bc5e87290f71ca6bc12377d234a Mon Sep 17 00:00:00 2001 From: pablochacin Date: Wed, 13 May 2026 18:46:08 +0200 Subject: [PATCH 3/3] Update client/client_grpc.go Co-authored-by: Josh van Leeuwen Signed-off-by: pablochacin --- client/client_grpc.go | 1 - 1 file changed, 1 deletion(-) diff --git a/client/client_grpc.go b/client/client_grpc.go index 34b2baa9..6b0cbab6 100644 --- a/client/client_grpc.go +++ b/client/client_grpc.go @@ -308,7 +308,6 @@ func makeWorkflowMetadata(resp *protos.GetInstanceResponse) (*backend.WorkflowMe return nil, fmt.Errorf("workflow state is nil") } - metadata := &backend.WorkflowMetadata{ InstanceId: resp.GetWorkflowState().GetInstanceId(), Name: resp.GetWorkflowState().GetName(),