pimutils / pimutils/khal

Importing updated event breaks database due to duplicate UID

Open
#873 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pri:High type: bug
Dominant language
Python
Stars
3.1k
Forks
233
Avg merge
1h 44m
Merged PRs (30d)
1

Description

When someone updates a calendar event, and I import the resulting ICS "updated invitation", then khal inserts a new record, causing a duplicate UID conflict:

error: madduck_calendar/calendar.ics: Storage "madduck_calendar_local/calendar.ics" contains multiple items with the same UID or even content. Vdirsyncer will now abort the synchronization of this collection, because the fix for this is not clear; It could be the result of a badly behaving server. You can try running:
error: 
error:     vdirsyncer repair madduck_calendar_local/calendar.ics
error: 
error: But make sure to have a backup of your data in some form. The offending hrefs are:
error: 
error: '35f41be794204ef89e5e055bdf86b800.ics'
error: '6448594d644f4976babb5d1f4cf6e2b0.ics'

It should really check if there's already an event with the UID, and if so, then update it.

For the record, repair fixes the issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace khal's import path for an updated ICS invitation and inspect how an existing UID is handled before insertion. Reproduce the duplicate-UID scenario described in the issue, then verify that importing the updated invitation updates the existing event without requiring vdirsyncer repair.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.