-
Notifications
You must be signed in to change notification settings - Fork 48
don't delete change request or send email on correction failure #3127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
don't delete change request or send email on correction failure #3127
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3127 +/- ##
=====================================
Coverage 6.51% 6.51%
=====================================
Files 179 179
Lines 4423 4423
Branches 486 486
=====================================
Hits 288 288
Misses 4133 4133
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the circumstances in which autoincrementVersion
could fail? What problem does this solve?
@Courey, my guess is that you were responding to It is not clear to me that this is an improvement. |
I did this because on failure, the request is deleted and the email is sent anyway. If it fails to put the version, it should not send an email or delete the request. By moving it out, if it fails, it never gets to the part that sends a success email or deletes the request. This means that if the moderator refreshes, they can try again. If it's not a temporary issue, they can also see what the error is and if there is a code fix required, the change request will still be there when a fix is released. |
Description
We don't want to delete the change request or send any emails or kafka messages if the correction fails. When the promise to update is in the array of promises and gets called with promise.all, it fails after the change request is deleted and emails are sent. This means that no correction has persisted, but the request is gone.
What this branch does is calls the put alone. It then only calls promise.all if that put has succeeded. This means that if there is a failure to create the update, nothing will be sent and the correction request will remain. It may fail again if there is a bug that prevents it from succeeding, but it will hang around till we can fix the bug and try the approval again.
Testing
I tested this locally by: