Skip to content

Commit

Permalink
Remove deprecated ReportEventHandled rpc from piped API (#5620)
Browse files Browse the repository at this point in the history
Signed-off-by: khanhtc1202 <[email protected]>
  • Loading branch information
khanhtc1202 authored Mar 4, 2025
1 parent 874278e commit 6cf5097
Show file tree
Hide file tree
Showing 5 changed files with 614 additions and 1,024 deletions.
16 changes: 0 additions & 16 deletions pkg/app/server/grpcapi/piped_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -807,22 +807,6 @@ func (a *PipedAPI) ListEvents(ctx context.Context, req *pipedservice.ListEventsR
}, nil
}

// Deprecated. This is only for the old Piped agents.
func (a *PipedAPI) ReportEventsHandled(ctx context.Context, req *pipedservice.ReportEventsHandledRequest) (*pipedservice.ReportEventsHandledResponse, error) {
_, pipedID, _, err := rpcauth.ExtractPipedToken(ctx)
if err != nil {
return nil, err
}

for _, id := range req.EventIds {
if err := a.eventStore.UpdateStatus(ctx, id, model.EventStatus_EVENT_SUCCESS, fmt.Sprintf("successfully handled by %q piped", pipedID)); err != nil {
return nil, gRPCStoreError(err, fmt.Sprintf("update event %s as handled", id))
}
}

return &pipedservice.ReportEventsHandledResponse{}, nil
}

func (a *PipedAPI) ReportEventStatuses(ctx context.Context, req *pipedservice.ReportEventStatusesRequest) (*pipedservice.ReportEventStatusesResponse, error) {
_, _, _, err := rpcauth.ExtractPipedToken(ctx)
if err != nil {
Expand Down
Loading

0 comments on commit 6cf5097

Please sign in to comment.