pimutils / pimutils/vdirsyncer

Feature Request: Configurable field exclusions for ETag calculation in http storage

Open
#1,214 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem

When using the http storage type to sync public ICS calendar feeds, vdirsyncer recalculates the ETag from from content on every sync run. Many public calendar providers (e.g. calovo, but likely others as well) update volatile fields like DTSTAMP, LAST-MODIFIED, and SEQUENCE on every export — even when no events have actually changed.

This causes vdirsyncer to treat the events / entire calendar as modified on every sync run, resulting in (all) events being deleted and re-created in the target storage (e.g. Nextcloud via CalDAV). The sync never reaches a stable state.

Since the file content differs, vdirsyncer detects a change and re-uploads all events, even though no meaningful data changed.

Current workaround

We are experimenting with a preprocessing script that strips volatile fields before vdirsyncer reads the file, and switched from http storage to filesystem storage to allow per-VEVENT UID-based comparison. This seems to be working, but adds significant complexity to the setup.

Proposed solution

Add an optional ignore_fields parameter to the http storage that excludes specified iCalendar fields from the ETag calculation. This would allow users to declare fields that are known to be volatile and irrelevant for change detection.

Example configuration:

[storage my_public_calendar]
type = "http"
url = "https://example.com/calendar.ics"
read_only = true
ignore_fields = ["DTSTAMP", "LAST-MODIFIED", "SEQUENCE"]
Why this makes sense
  • DTSTAMP, LAST-MODIFIED, and SEQUENCE are standard iCalendar fields that many providers update automatically on every export, regardless of actual event changes
  • These fields carry no meaningful information in the context of read-only public feeds
  • The feature would be fully opt-in and backwards compatible — existing configurations are unaffected
  • It would eliminate the need for preprocessing workarounds for a common real-world use case
  • The problem is not specific to any single provider — any public ICS feed with server-side timestamp updates is affected
Environment
  • vdirsyncer 0.20.0
  • Target: Nextcloud CalDAV
  • Source: Public ICS feeds (calovo.com)

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

The issue names no files or tests. Start by locating the http storage implementation, its ETag calculation, and configuration parsing, then inspect related storage tests. Done means an optional ignore_fields setting excludes the specified iCalendar fields from ETag calculation while existing configurations remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.