Skip to content

Commit 9a60f09

Browse files
committed
explicitly ignore unhandled errors
Signed-off-by: Fabian Martinez <[email protected]>
1 parent 7ec83e0 commit 9a60f09

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

backend/orchestration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (w *orchestratorProcessor) applyWorkItem(ctx context.Context, wi *Orchestra
153153

154154
// The orchestrator started event is used primarily for updating the current time as reported
155155
// by the orchestration context APIs.
156-
runtimestate.AddEvent(wi.State, &protos.HistoryEvent{
156+
_ = runtimestate.AddEvent(wi.State, &protos.HistoryEvent{
157157
EventId: -1,
158158
Timestamp: timestamppb.Now(),
159159
EventType: &protos.HistoryEvent_OrchestratorStarted{

backend/runtimestate/runtimestate.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func ApplyActions(s *protos.OrchestrationRuntimeState, customStatus *wrapperspb.
8787
if completedAction.OrchestrationStatus == protos.OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW {
8888
newState := NewOrchestrationRuntimeState(s.InstanceId, customStatus, []*protos.HistoryEvent{})
8989
newState.ContinuedAsNew = true
90-
AddEvent(newState, &protos.HistoryEvent{
90+
_ = AddEvent(newState, &protos.HistoryEvent{
9191
EventId: -1,
9292
Timestamp: timestamppb.Now(),
9393
EventType: &protos.HistoryEvent_OrchestratorStarted{
@@ -97,7 +97,7 @@ func ApplyActions(s *protos.OrchestrationRuntimeState, customStatus *wrapperspb.
9797
})
9898

9999
// Duplicate the start event info, updating just the input
100-
AddEvent(newState,
100+
_ = AddEvent(newState,
101101
&protos.HistoryEvent{
102102
EventId: -1,
103103
Timestamp: timestamppb.New(time.Now()),
@@ -119,7 +119,7 @@ func ApplyActions(s *protos.OrchestrationRuntimeState, customStatus *wrapperspb.
119119

120120
// Unprocessed "carryover" events
121121
for _, e := range completedAction.CarryoverEvents {
122-
AddEvent(newState, e)
122+
_ = AddEvent(newState, e)
123123
}
124124

125125
// Overwrite the current state object with a new one
@@ -180,7 +180,7 @@ func ApplyActions(s *protos.OrchestrationRuntimeState, customStatus *wrapperspb.
180180
}
181181
}
182182
} else if createtimer := action.GetCreateTimer(); createtimer != nil {
183-
AddEvent(s, &protos.HistoryEvent{
183+
_ = AddEvent(s, &protos.HistoryEvent{
184184
EventId: action.Id,
185185
Timestamp: timestamppb.New(time.Now()),
186186
EventType: &protos.HistoryEvent_TimerCreated{
@@ -217,15 +217,15 @@ func ApplyActions(s *protos.OrchestrationRuntimeState, customStatus *wrapperspb.
217217
},
218218
Router: action.Router,
219219
}
220-
AddEvent(s, scheduledEvent)
220+
_ = AddEvent(s, scheduledEvent)
221221
s.PendingTasks = append(s.PendingTasks, scheduledEvent)
222222
} else if createSO := action.GetCreateSubOrchestration(); createSO != nil {
223223
// Autogenerate an instance ID for the sub-orchestration if none is provided, using a
224224
// deterministic algorithm based on the parent instance ID to help enable de-duplication.
225225
if createSO.InstanceId == "" {
226226
createSO.InstanceId = fmt.Sprintf("%s:%04x", s.InstanceId, action.Id)
227227
}
228-
AddEvent(s, &protos.HistoryEvent{
228+
_ = AddEvent(s, &protos.HistoryEvent{
229229
EventId: action.Id,
230230
Timestamp: timestamppb.New(time.Now()),
231231
EventType: &protos.HistoryEvent_SubOrchestrationInstanceCreated{
@@ -276,7 +276,7 @@ func ApplyActions(s *protos.OrchestrationRuntimeState, customStatus *wrapperspb.
276276
},
277277
Router: action.Router,
278278
}
279-
AddEvent(s, e)
279+
_ = AddEvent(s, e)
280280
s.PendingMessages = append(s.PendingMessages, &protos.OrchestrationRuntimeStateMessage{HistoryEvent: e, TargetInstanceID: sendEvent.Instance.InstanceId})
281281
} else if terminate := action.GetTerminateOrchestration(); terminate != nil {
282282
// Send a message to terminate the target orchestration

0 commit comments

Comments
 (0)