-
Notifications
You must be signed in to change notification settings - Fork 262
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
fix(outbox): catch failed SENT copy operation #9364
Conversation
3536927
to
c35fe55
Compare
Unassigning from the milestone because this is not a must have. We can merge at any time and backport. |
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.
Testing the case where CopySentMessageHandler fails: An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'raw' in 'field list'
resulting in a HTTP500.
\OCP\AppFramework\Db\QBMapper::update
is called with a LocalMessage
|
Did you run the migration again? The "raw" field was introduced later. |
Raw is a column for local messages, not messages |
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.
Successful case works ✔️
An error in \OCA\Mail\Send\CopySentMessageHandler::process
shows an error toast in the front-end ✔️
After the error the message vanishes from the outbox. From a user perspective it's simply gone ❌
This is bad because the user will not find the message anywhere, making it look like it was never sent. Messages that failed to copy on IMAP but were sent should show in a transparent matter. As in, they stay in the outbox, visible, but read-only.
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.
Failed messages appear in the outbox ✔️
Retried messages are processed by the worker job and finally disappear from the outbox ✔️
Frontend handling can be improved ^
Added a bit of shiny for the frontend |
Clicking messages stuck in the outbox no longer causes an error ✔️ But the UX is strange. The message appears clickable but nothing happens on click. The cursor should be the default one, not pointer. With the latest UI changes the ability to force resend/retry was lost. It's only possible to delete stuck outbox messages or wait for the cron job to retry/resend. |
We can use an NcListItemIcon instead of the NcListItem that does the rendering for the pointer,. Since NcListItem it also does the rendering for the status message, it's kinda weird though. There's no prop that I can see that will allow the pointer to be set for the NcListItem component. The styles don't really work well together for the NcListItem and NcListItemIcon (first one is NcListItemIcon, second and third are NcListItem): I changed the actions button to include the "send" action again for messages not copied to the sent mailbox but labeled it 'Copy to "Sent" mailbox' |
On further thinking I'd actually like to see the right panel being used. We could treat outbox messages like "Sent" messages and display them like a regular email, with an "Edit" button for anything that's not been sent yet. Would get rid of the awkward unused message content space and allow for a preview of any sent messages. cc @nimishavijay For now, I'd leave the NcListItem even though it's a tiny bit awkward with the non- action on click unless a frontender wants to take a real shot at refactoring the whole thing to render better than my awkward try with the NcListItemIcon. |
Then we leave the cursor pointer or use :v-deep to overwrite it Once force send is back, conflicts are resolved and CI is green we can merge this |
force send is a different PR, no? |
This is what I mean by "force" resend. When storing on IMAP fails temporarily I want to be able to retry. |
|
d00de44
to
c152d0b
Compare
Related tests fail |
fb74554
to
3e84000
Compare
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.
Tested & works
and try resending failed messages at POF Signed-off-by: Anna Larch <[email protected]>
554d613
to
7c59040
Compare
/backport to stable3.6 |
Fixes #8435
Sending a mail could fail at any point in the send operation.
This PR aims to introduce clear status codes that allow for the send code to redo the operations that fail.
Everything except the actual IMAP send and copying the sent message to the SENT mailbox are idempotent.