pimutils / pimutils/vdirsyncer

No CalDAV PUT, after only DTSTAMP was changed in an iCalendar file

Open
#934 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
185
Avg merge
11h 49m
Merged PRs (30d)
1

Description

I use the latest vdirsyncer. I have a pair:

[pair summer_universities]
a = "su_local"
b = "su_remote"
collections = null
conflict_resolution = "a wins"

[storage su_local]
type = "filesystem"
path = "su"
fileext = ".ics"

[storage su_remote]
type = "caldav"
url = "http://127.0.0.3/dav/calendars/user/mmm@example.org/su/"
username = "mmm@bapha.be"
password = "mmm"

In the ./su directory there are some .ics files. If I change the DTSTAMP property from DTSTAMP:20210727T124744Z to DTSTAMP:20210727T124745Z and call vdirsyncer -vdebug -c config sync summer_universities, the output is:

Syncing summer_universities
debug: ====================
debug: PROPFIND http://127.0.0.3/dav/calendars/user/mmm@example.org/su/
debug: {'User-Agent': 'vdirsyncer/0.18.1.dev76+gcfd4b11', 'Content-Type': 'application/xml; charset=UTF-8', 'Depth': '1'}
debug: b'<?xml version="1.0" encoding="utf-8" ?>\n            <propfind xmlns="DAV:">\n                <prop>\n                    <resourcetype/>\n                    <getcontenttype/>\n                    <getetag/>\n                </prop>\n            </propfind>\n            '
debug: Sending request...
debug: 207
debug: <CIMultiDictProxy('Date': 'Wed, 25 Aug 2021 14:52:14 GMT', 'Vary': 'Accept-Encoding, Brief, Prefer', 'Content-Type': 'application/xml; charset=utf-8', 'Transfer-Encoding': 'chunked')>
debug: <StreamReader 3906 bytes>
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/'
debug: Skipping '/dav/calendars/user/mmm@example.org/su/', is collection.
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-11.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-12.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-14.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-16.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-19.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-2.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-20.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-21.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-22.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-25.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-27.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-28.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-3.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-4.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-5.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-6.ics'

→ There is no PUT.

If I change in another file the property CATEGORIES:Local cultureCATEGORIES:Local culture2, and call again vdirsyncer -vdebug -c config sync summer_universities, the output is:

$ vdirsyncer -vdebug -c config sync summer_universities                                                                                Syncing summer_universities                                                                                                                                   debug: ====================                                                                                                                                   debug: PROPFIND http://127.0.0.3/dav/calendars/user/ggg@bapha.be/su/                                                                                          debug: {'User-Agent': 'vdirsyncer/0.18.1.dev76+gcfd4b11', 'Content-Type': 'application/xml; charset=UTF-8', 'Depth': '1'}                                     debug: b'<?xml version="1.0" encoding="utf-8" ?>\n            <propfind xmlns="DAV:">\n                <prop>\n                    <resourcetype/>\n                    <getcontenttype/>\n                    <getetag/>\n                </prop>\n            </propfind>\n            '                                  debug: Sending request...                                                                                                                                     debug: 207                                                                                                                                                    debug: <CIMultiDictProxy('Date': 'Wed, 25 Aug 2021 14:53:31 GMT', 'Vary': 'Accept-Encoding, Brief, Prefer', 'Content-Type': 'application/xml; charset=utf-8', 'Transfer-Encoding': 'chunked')>                                                                                                                              debug: <StreamReader 3906 bytes>                                                                                                                              
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/'                                                                                             debug: Skipping '/dav/calendars/user/mmm@example.org/su/', is collection.                                                                                        
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-11.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-12.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-14.ics'                                                   debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-16.ics'                           
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-19.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-2.ics'                                                    debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-20.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-21.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-22.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-25.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-27.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-28.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-3.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-4.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-5.ics'
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-6.ics'
Copying (updating) item e947872a-224b-4c84-8d25-90a541a9ec8-12 to su_remote
debug: Already normalized: '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-12.ics'
debug: ====================
debug: PUT http://127.0.0.3/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-12.ics
debug: {'User-Agent': 'vdirsyncer/0.18.1.dev76+gcfd4b11', 'Content-Type': 'text/calendar', 'If-Match': '"0d56f85b3c1c51f6b771e76476f54bed4a01fcc4"'}
debug: b"BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:aegee-ical-3\r\nBEGIN:VEVENT\r\nUID:e947872a-224b-4c84-8d25-90a541a9ec8-12\r\nDTSTAMP:20210718T124847Z\r\nCR
EATED:20210214T165222Z\r\nATTENDEE;CN=AEGEE-Ni\xc5\xa1:https://my.aegee.eu/bodies/122\r\nDTSTART:20210726T040000Z\r\nDTEND:20210808T210000Z\r\nURL:https://my.
aegee.eu/summeruniversity/Balkan-TreaSUre\r\nCATEGORIES:Local culture2\r\nLOCATION:Ni\xc5\xa1\r\nGEO:43.32268872898996;21.895982827451547\r\nSUMMARY:Balkan Tr
eaSUre\r\nDESCRIPTION:Unravel and explore the beautiful and breathtaking sceneries of\r\n  Serbia\\, enjoy the most delicious cuisines our Balkan has to offer
\\, and t\r\n ry out your skills in paintball\\, ziplining\\, wall-climbing while enjoying \r\n many nature strolls through the captivating forests of Zlatibo
r. You will e\r\n njoy the amazing things our wonderful Balkan has to offer\\, and with our ho\r\n spitality\\, you will feel like you are at home!\\n\\nOur j
ourney starts in Ni\r\n \xc5\xa1\\, the center of the southeast region of Serbia and one of the oldest cit\r\n ies in the Balkan. Take a step through history 
by visiting major monuments\\\r\n , such as \xc4\x8cegat and Skull Tower\\, explore the customs and old ways of Serb\r\n ia in the old Ethnic Village of Sirog
ojno\\, and breathe in the fresh air wh\r\n ile enjoying the view from Zlatibor mountain and Ni\xc5\xa1ka Banja. Try out your\r\n  skills in paintball and wal
l-climbing and flavor in the cuisine from our w\r\n orld-famous - Kafana! Enjoy the music\\, the atmosphere\\, and great parties \r\n while relaxing near the 
Riverside! Prepare for the daunting and exciting ta\r\n le and mystery of the Devil's Town near Ni\xc5\xa1 and get a glimpse of this worl\r\n d's famous uniqu
e monument!\\n\\nExplore and enjoy the Balkan customs and cul\r\n ture and have fun in the city that never sleeps! Let's try to find the trea\r\n SUre within 
our beautiful region together and create beautiful memories tog\r\n ether! Take a step through time in the amazing Ethno Village of Sirogojno\\,\r\n  explore 
our many amazing historical monuments\\, such as the Skull Tower an\r\n d \xc4\x8cegar\\, and dine-in our delicious cuisine in Kafanas!  Hike and enjoy th\r\n e breathtaking Zlatibor mountain and the parks in Ni\xc5\xa1ka Banja! Take a look\r\n  at the magnificent Bubanj Monument and explore the mysterious Devil's Town\r\n \\, full of excitement and nature! Accomodation: Dormitory and Zlatibor Moun\r\n tain Resort. Video at https://www.youtube.com/watch?v=NUSLn0akJM4. \xf0\x9f\x8c\x90 htt\r\n ps://www.aegeenis.org.rs\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"
debug: Sending request...
debug: 204
debug: <CIMultiDictProxy('Date': 'Wed, 25 Aug 2021 14:53:31 GMT', 'Cache-Control': 'no-cache', 'Accept-Patch': 'text/calendar; charset=utf-8; component=VPATCH; optinfo="PATCH-VERSION:1"', 'Etag': '"ba462418b30f12f84e61c58323894e91677d147f"', 'Last-Modified': 'Wed, 25 Aug 2021 14:53:31 GMT')>
debug: <aiohttp.streams.EmptyStreamReader object at 0x7f5feb9af550>
debug: Normalized URL from 'http://127.0.0.3/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-12.ics' to '/dav/calendars/user/mmm@example.org/su/e947872a-224b-4c84-8d25-90a541a9ec8-12.ics'

→ There is PUT.

Why are the changes not uploaded, when only DTSTAMP is changed, but the changes are uploaded, when only CATEGORIES is changed?

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

Start by reproducing the two vdirsyncer sync commands with the provided filesystem and CalDAV configuration, comparing the DTSTAMP-only and CATEGORIES changes. Trace the synchronization decision and item comparison path responsible for deciding whether to issue PUT; done means the DTSTAMP behavior is explained and covered by a reproducible test or documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.