Skip to content

Commit db8ad64

Browse files
authored
Nexus Standalone: Delete (#9654)
## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [x] added new functional test(s) Can't verify functional tests yet due to missing impl.
1 parent 3d3a2de commit db8ad64

15 files changed

Lines changed: 600 additions & 71 deletions

chasm/lib/nexusoperation/frontend.go

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,30 @@ func (h *frontendHandler) TerminateNexusOperationExecution(
276276
return &workflowservice.TerminateNexusOperationExecutionResponse{}, nil
277277
}
278278

279-
func (h *frontendHandler) DeleteNexusOperationExecution(_ context.Context, req *workflowservice.DeleteNexusOperationExecutionRequest) (*workflowservice.DeleteNexusOperationExecutionResponse, error) {
279+
func (h *frontendHandler) DeleteNexusOperationExecution(
280+
ctx context.Context,
281+
req *workflowservice.DeleteNexusOperationExecutionRequest,
282+
) (*workflowservice.DeleteNexusOperationExecutionResponse, error) {
280283
if !h.isStandaloneNexusOperationEnabled(req.GetNamespace()) {
281284
return nil, ErrStandaloneNexusOperationDisabled
282285
}
283-
return nil, serviceerror.NewUnimplemented("DeleteNexusOperationExecution not implemented")
286+
287+
namespaceID, err := h.namespaceRegistry.GetNamespaceID(namespace.Name(req.GetNamespace()))
288+
if err != nil {
289+
return nil, err
290+
}
291+
292+
if err := validateAndNormalizeDeleteRequest(req, h.config); err != nil {
293+
return nil, err
294+
}
295+
296+
_, err = h.client.DeleteNexusOperation(ctx, &nexusoperationpb.DeleteNexusOperationRequest{
297+
NamespaceId: namespaceID.String(),
298+
FrontendRequest: req,
299+
})
300+
if err != nil {
301+
return nil, err
302+
}
303+
304+
return &workflowservice.DeleteNexusOperationExecutionResponse{}, nil
284305
}

chasm/lib/nexusoperation/gen/nexusoperationpb/v1/request_response.go-helpers.pb.go

Lines changed: 74 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chasm/lib/nexusoperation/gen/nexusoperationpb/v1/request_response.pb.go

Lines changed: 116 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)