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

[CAPPL-320] implement HexDecodeWorkflowName #983

Merged
merged 5 commits into from
Jan 8, 2025
Merged
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
2 changes: 2 additions & 0 deletions pkg/capabilities/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ type RequestMetadata struct {
WorkflowDonConfigVersion uint32
// The step reference ID of the workflow
ReferenceID string
// Use DecodedWorkflowName if the human readable name needs to be exposed, such as for logging purposes.
DecodedWorkflowName string
agparadiso marked this conversation as resolved.
Show resolved Hide resolved
}

type RegistrationMetadata struct {
Expand Down
328 changes: 170 additions & 158 deletions pkg/capabilities/pb/capabilities.pb.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pkg/capabilities/pb/capabilities.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ message RequestMetadata {
uint32 workflow_don_id = 6;
uint32 workflow_don_config_version = 7;
string reference_id = 8;
string decoded_workflow_name = 9;
}

message CapabilityRequest {
Expand Down
2 changes: 2 additions & 0 deletions pkg/capabilities/pb/capabilities_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func CapabilityRequestToProto(req capabilities.CapabilityRequest) *CapabilityReq
WorkflowDonId: req.Metadata.WorkflowDonID,
WorkflowDonConfigVersion: req.Metadata.WorkflowDonConfigVersion,
ReferenceId: req.Metadata.ReferenceID,
DecodedWorkflowName: req.Metadata.DecodedWorkflowName,
},
Inputs: values.ProtoMap(inputs),
Config: values.ProtoMap(config),
Expand Down Expand Up @@ -101,6 +102,7 @@ func CapabilityRequestFromProto(pr *CapabilityRequest) (capabilities.CapabilityR
WorkflowDonID: md.WorkflowDonId,
WorkflowDonConfigVersion: md.WorkflowDonConfigVersion,
ReferenceID: md.ReferenceId,
DecodedWorkflowName: md.DecodedWorkflowName,
},
Config: config,
Inputs: inputs,
Expand Down
1 change: 1 addition & 0 deletions pkg/capabilities/pb/capabilities_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func TestMarshalUnmarshalRequest(t *testing.T) {
WorkflowDonID: 1,
WorkflowDonConfigVersion: 1,
ReferenceID: anyReferenceID,
DecodedWorkflowName: "test-workflow-name",
},
Config: &values.Map{Underlying: map[string]values.Value{
testConfigKey: &values.String{Underlying: testConfigValue},
Expand Down
99 changes: 55 additions & 44 deletions pkg/workflows/wasm/pb/wasm.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/workflows/wasm/pb/wasm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ message FetchRequestMetadata {
string workflowName = 2;
string workflowOwner = 3;
string workflowExecutionId = 4;
string decodedWorkflowName = 5;
}

message FetchRequest {
Expand Down
1 change: 1 addition & 0 deletions pkg/workflows/wasm/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ func createFetchFn(
WorkflowName: sdkConfig.Metadata.WorkflowName,
WorkflowOwner: sdkConfig.Metadata.WorkflowOwner,
WorkflowExecutionId: sdkConfig.Metadata.WorkflowExecutionID,
DecodedWorkflowName: sdkConfig.Metadata.DecodedWorkflowName,
},
})
if err != nil {
Expand Down
Loading