fix: repair missing action rows on status update - #7812
Rohithmatham12 wants to merge 1 commit into
Conversation
| } | ||
| if rowsAffected > 0 { | ||
| r.notifyActionUpdate(ctx, actionID) | ||
| } else if _, err := r.GetAction(ctx, actionID); err != nil { |
There was a problem hiding this comment.
Any database error is reported as "not found". GetAction returns an error for timeouts and connection problems too. So those become CodeNotFound and trigger an unneeded re-record.
|
|
||
| func (c *ActionsClient) recordActionInRunService(ctx context.Context, taskAction *executorv1.TaskAction, update *ActionUpdate, actionKey []byte) bool { | ||
| recordReq := buildRecordActionRequest(ctx, taskAction, update) | ||
| if _, err := c.runClient.RecordAction(ctx, connect.NewRequest(recordReq)); err != nil { |
There was a problem hiding this comment.
RecordAction failures inside the response are treated as success. We should catch the resp here as well and then check resp.Msg.GetStatus().GetCode() to log failures.
f54ffef to
533edee
Compare
|
Rebased on current What changed:
Validation:
I also attempted the focused repository DB tests, but the local embedded Postgres test port was already occupied on this machine:
That package should get a clean DB process in CI. |
Signed-off-by: Rohithmatham12 <rohithmatham@gmail.com>
533edee to
3448964
Compare
Summary
Fixes #7257.
Testing