fix(batches): show warning instead of error when the changeset status is not FAILED#64243
Conversation
peterguy
left a comment
There was a problem hiding this comment.
I think this is a good idea. Do we collect these errors or will they be lost once the batch change is marked as failed?
The batch changes reconciler stores the latest error it has seen. If it fully fails, it will continue to display that error, and if it succeeds the errors may be cleaned up (not sure if the previous_error field gets cleaned up on success, but if it's successful it should be okay). |
|
Update: https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/internal/batches/reconciler/executor.go?L155 shows that the previous error message is deleted if the action that the worker should perform completes without an error. So if it fails, it should keep the previous error in the database. |
With SRCH-802 we saw error messages when batch changes may still retry and resolve the problem. To give a better distinction between resolvable and non-resolvable errors, I'm changing the colour variation from error to warning if the changeset has not been marked as
FAILEDyet.Before:
After:
Test plan
Manual testing
Changelog