Skip to content
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

ikhal: fix deleting of multiple instances #1273

Merged
merged 1 commit into from
Jun 23, 2023
Merged

ikhal: fix deleting of multiple instances #1273

merged 1 commit into from
Jun 23, 2023

Conversation

geier
Copy link
Member

@geier geier commented Jun 16, 2023

When deleting multiple instances of the same recurring event, ikhal would crash because of mismatching etags. This would happen, because we delete one instance after the next, each time updating the etag. As we check for matching etags when deleting (the one in the database and the one stored in ikhal), this would crash ikhal. Matching the etag makes sense, as we might overwrite freshly synced data otherwise. For now, the server wins.

fix #1190

Copy link
Member

@WhyNotHugo WhyNotHugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested this, but code changes make perfect sense to me.

@geier
Copy link
Member Author

geier commented Jun 18, 2023

thanks for reviewing @WhyNotHugo! I'll wait a few more days and see if someone is able to give this a try.

@tobiolo
Copy link

tobiolo commented Jun 22, 2023

I tested it. It works without problem. Thanks for having it fixed. vdirsyncer outputs a warning warning: Deleting an item with no etag. when it gets synced but I think this is ok.

@WhyNotHugo
Copy link
Member

vdirsyncer outputs a warning warning: Deleting an item with no etag. when it gets synced but I think this is ok.

This sounds unrelated. Doesn't it also print the same thing when deleting a non-recurring event?

When deleting multiple instances of the same recurring event, ikhal
would crash because of mismatching etags. This would happen, because we
delete one instance after the next, each time updating the etag. As we
check for matching etags when deleting (the one in the database and the
one stored in ikhal), this would crash ikhal. Matching the etag makes
sense, as we might overwrite freshly synced data otherwise. For now, the
server wins.
@geier geier enabled auto-merge June 23, 2023 15:30
@geier geier merged commit fa5fddc into master Jun 23, 2023
4 checks passed
@geier geier deleted the fix/1190 branch June 23, 2023 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ikhal: Deleting multiple instances of the same recurring event raises khal.khalendar.exceptions.EtagMissmatch
3 participants