diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index c52246cd..e07e66d5 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -910,6 +910,9 @@ message CapabilityResponse { google.protobuf.Any payload = 1; string error = 2; } + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + string capability_id = 3; } enum Mode { @@ -955,6 +958,9 @@ message ExecutionResult { string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; } + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + optional string failed_capability_id = 4; } message GetSecretsRequest { @@ -1069,6 +1075,9 @@ message CapabilityResponse { google.protobuf.Any payload = 1; string error = 2; } + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + string capability_id = 3; } enum Mode { @@ -1114,6 +1123,9 @@ message ExecutionResult { string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; } + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + optional string failed_capability_id = 4; } message GetSecretsRequest { diff --git a/cre/go/sdk/sdk.pb.go b/cre/go/sdk/sdk.pb.go index 3ab84306..e1ae4ee4 100644 --- a/cre/go/sdk/sdk.pb.go +++ b/cre/go/sdk/sdk.pb.go @@ -622,7 +622,10 @@ type CapabilityResponse struct { // // *CapabilityResponse_Payload // *CapabilityResponse_Error - Response isCapabilityResponse_Response `protobuf_oneof:"response"` + Response isCapabilityResponse_Response `protobuf_oneof:"response"` + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + CapabilityId string `protobuf:"bytes,3,opt,name=capability_id,json=capabilityId,proto3" json:"capability_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -682,6 +685,13 @@ func (x *CapabilityResponse) GetError() string { return "" } +func (x *CapabilityResponse) GetCapabilityId() string { + if x != nil { + return x.CapabilityId + } + return "" +} + type isCapabilityResponse_Response interface { isCapabilityResponse_Response() } @@ -1047,9 +1057,12 @@ type ExecutionResult struct { // *ExecutionResult_Value // *ExecutionResult_Error // *ExecutionResult_TriggerSubscriptions - Result isExecutionResult_Result `protobuf_oneof:"result"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Result isExecutionResult_Result `protobuf_oneof:"result"` + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + FailedCapabilityId *string `protobuf:"bytes,4,opt,name=failed_capability_id,json=failedCapabilityId,proto3,oneof" json:"failed_capability_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecutionResult) Reset() { @@ -1116,6 +1129,13 @@ func (x *ExecutionResult) GetTriggerSubscriptions() *TriggerSubscriptionRequest return nil } +func (x *ExecutionResult) GetFailedCapabilityId() string { + if x != nil && x.FailedCapabilityId != nil { + return *x.FailedCapabilityId + } + return "" +} + type isExecutionResult_Result interface { isExecutionResult_Result() } @@ -1634,10 +1654,11 @@ const file_sdk_v1alpha_sdk_proto_rawDesc = "" + "\apayload\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\apayload\x12\x16\n" + "\x06method\x18\x03 \x01(\tR\x06method\x12\x1f\n" + "\vcallback_id\x18\x04 \x01(\x05R\n" + - "callbackId\"j\n" + + "callbackId\"\x8f\x01\n" + "\x12CapabilityResponse\x120\n" + "\apayload\x18\x01 \x01(\v2\x14.google.protobuf.AnyH\x00R\apayload\x12\x16\n" + - "\x05error\x18\x02 \x01(\tH\x00R\x05errorB\n" + + "\x05error\x18\x02 \x01(\tH\x00R\x05error\x12#\n" + + "\rcapability_id\x18\x03 \x01(\tR\fcapabilityIdB\n" + "\n" + "\bresponse\"m\n" + "\x13TriggerSubscription\x12\x0e\n" + @@ -1661,12 +1682,14 @@ const file_sdk_v1alpha_sdk_proto_rawDesc = "" + "\tsubscribe\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R\tsubscribe\x120\n" + "\atrigger\x18\x03 \x01(\v2\x14.sdk.v1alpha.TriggerH\x00R\atrigger\x12*\n" + "\x11max_response_size\x18\x04 \x01(\x04R\x0fmaxResponseSizeB\t\n" + - "\arequest\"\xbd\x01\n" + + "\arequest\"\x8d\x02\n" + "\x0fExecutionResult\x12(\n" + "\x05value\x18\x01 \x01(\v2\x10.values.v1.ValueH\x00R\x05value\x12\x16\n" + "\x05error\x18\x02 \x01(\tH\x00R\x05error\x12^\n" + - "\x15trigger_subscriptions\x18\x03 \x01(\v2'.sdk.v1alpha.TriggerSubscriptionRequestH\x00R\x14triggerSubscriptionsB\b\n" + - "\x06result\"l\n" + + "\x15trigger_subscriptions\x18\x03 \x01(\v2'.sdk.v1alpha.TriggerSubscriptionRequestH\x00R\x14triggerSubscriptions\x125\n" + + "\x14failed_capability_id\x18\x04 \x01(\tH\x01R\x12failedCapabilityId\x88\x01\x01B\b\n" + + "\x06resultB\x17\n" + + "\x15_failed_capability_id\"l\n" + "\x11GetSecretsRequest\x126\n" + "\brequests\x18\x01 \x03(\v2\x1a.sdk.v1alpha.SecretRequestR\brequests\x12\x1f\n" + "\vcallback_id\x18\x02 \x01(\x05R\n" + diff --git a/cre/sdk/v1alpha/sdk.proto b/cre/sdk/v1alpha/sdk.proto index 4be81f5e..26a8dc32 100644 --- a/cre/sdk/v1alpha/sdk.proto +++ b/cre/sdk/v1alpha/sdk.proto @@ -66,6 +66,9 @@ message CapabilityResponse { google.protobuf.Any payload = 1; string error = 2; } + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + string capability_id = 3; } enum Mode { @@ -111,6 +114,9 @@ message ExecutionResult { string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; } + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + optional string failed_capability_id = 4; } message GetSecretsRequest { diff --git a/cre/sdk/v1beta/sdk.proto b/cre/sdk/v1beta/sdk.proto index 39d73ae0..7f4e191c 100644 --- a/cre/sdk/v1beta/sdk.proto +++ b/cre/sdk/v1beta/sdk.proto @@ -66,6 +66,9 @@ message CapabilityResponse { google.protobuf.Any payload = 1; string error = 2; } + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + string capability_id = 3; } enum Mode { @@ -111,6 +114,9 @@ message ExecutionResult { string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; } + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + optional string failed_capability_id = 4; } message GetSecretsRequest {