Uh oh!
There was an error while loading. Please reload this page.
Bugfix/36644 pruneOutdatedSyncTokens deletes all entries - #38639
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
charno
commented
Jun 5, 2023
@tcitworld Thanks for the feedback, I'll have a look in the evening. Do you know by chance how I can run the linters using vs code and the dev container? Also I just noticed that you tagged this for Version 28. Do you plan to backport this to 26 / 27? |
tcitworld
commented
Jun 5, 2023
/backport to stable27 |
tcitworld
commented
Jun 5, 2023
/backport to stable26 |
tcitworld
commented
Jun 5, 2023
Unfortunately I don't know. However, it seems the only issues you have should be resolved alongside with the issues I pointed out above.
Yup, that's planned. |
kesselb
commented
Jun 5, 2023
Wow, good catch! |
Signed-off-by: Christof Arnosti <charno@charno.ch>
charno
commented
Jun 5, 2023
More detailed testing (request from Issue) and cleanups are done. Now for hoping linter / psalm is happy |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
charno
commented
Jun 6, 2023
@kesselb Can you also add / push the changes to CardDavBackend? I'm away from my dev workstation for the next days |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
charno
commented
Jun 8, 2023
I'll do some cleanup on weekend (Port changes done to Cal to Card, squishing formatting commits), then from my side I think it is finished |
charno
commented
Jun 10, 2023
I have done the formatting changes, now hopefully everything should be fine |
Uh oh!
There was an error while loading. Please reload this page.
pruneOutdatedSyncTokens accidentally deletes all entries of the calendarchanges table instead of leaving $limit elements in the table Signed-off-by: Christof Arnosti <charno@charno.ch>
charno
commented
Jun 12, 2023
Thanks for reviewing! I'm happy when this bug is gone, this one was especially painful for me |
st3iny
commented
Jun 20, 2023
/backport to stable25 |
szaimen
commented
Jun 20, 2023
CI failure unrelated |
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
tcitworld
commented
Jun 20, 2023
/backport to stable26 |
tcitworld
commented
Jun 20, 2023
/backport to stable27 |
Thanks for merging!
This will probably not be possible since the functionality this fixes is not present in 25 |
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
1 similar comment
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
1 similar comment
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
The backport to stable25 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable25
git pull origin stable25
# Create the new backport branch
git checkout -b fix/foo-stable25
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
Summary
With Nextcloud 26, CalDAV / CardDAV Clients which are using SyncToken (for example Thunderbird) don't receive calendar / contact updates which happened before the last run of
pruneOutdatedSyncTokens. During collaborative research we found out thatpruneOutdatedSyncTokensdoes delete all entries of calendarchanges / addressbookchanges by accident.This pull request changes the
pruneOutdatedSyncTokensfunctions to first select the highest ID in the*changestable and use it in a WHERE clause during deletion of the tokens.Sine calendar on Thunderbird / maybe other clients are regularly missing events I would say this is a quite high impact bug. For me and others, calendar syncing is currently practically unusable.
Checklist