ci: run async integration tests#669
Draft
tobixen wants to merge 4 commits into
Draft
Conversation
9234d74 to
d09ec45
Compare
8bc6b82 to
7bfb786
Compare
Calendar.delete() gains a wipe= tristate parameter:
True – wipe all objects, keep the calendar (for servers like Nextcloud
where HTTP DELETE moves the calendar to a trashbin)
False – always issue HTTP DELETE
None – existing auto-detect: wipe if the server doesn't support deletion
NotFoundError is now silently ignored per object during a wipe, so a
concurrent deletion or a server quirk doesn't abort the whole sweep.
Same fix applied to the async path (_async_delete).
Also clarifies two comments in calendarobjectresource.py: the expand_rrule
path uses client-side expansion (recurring_ical_events always supplies
RECURRENCE-ID), and only_this_recurrence silently misfires on server-side
expanded initial instances that RFC 4791 §9.6.5 permits to omit RECURRENCE-ID.
prompt: the github runs takes more than an hour now. Can we wipe the calendar instead of deleting it, and use the same calendar for all the tests?
followup-prompt: github runs still fail
followup-prompt: github test runs still fail, please investigate
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
AI Prompts:
claude-sonnet-4-6: The last test run at github passed. There has been 17 commits in this branch. Please check the differences between master and write a short recap of what has been done in this branch.
claude-sonnet-4-6: I didn't quite understand the main thing with this branch - getting the async tests running for cyrus, baikal and nextcloud. Shouldn't this have happened in master also? The test suite is started through tox, should go through all available images, and both sync and async tests should be started by tox? Next, can this branch be rebased into four distinct, logically independent commits with good commit messages?
claude-sonnet-4-6: All tests are passing both on github and locally in the master branch as far as I can see, but you say that the async tests are failing in master? Please explain. Regarding the rebase, I thought of git commits reflecting the grouping you did above; github CI infrastructure, core bugfixes, test reliability and compatibility hints.
claude-sonnet-4-6: yes. I suppose it will be needed to split some commits too. I think it's important to have a clean commit with the core bugfixes, and I'd also like to have all the github-related logic in a separate commit not touching anything else.
…ntegration run Nextcloud: - Add email addresses for scheduling test users (user1-user3). Without mailto: entries in calendar-user-address-set, iTIP delivery fails. - Disable CalDAV trashbin (calendarRetentionObligation=0) so that HTTP DELETE hard-deletes objects; without this, recreating the same UID causes a UNIQUE constraint violation (500 Internal Server Error). Cyrus: - Copy imapd.conf with virtdomains: off before starting CalDAV. The default virtdomains: userid causes caladdress_lookup() to retain the full email form as the userid while mailbox ACLs use the short form, resulting in 403 on iTIP invite delivery. - Unpin Cyrus from the March 2026 digest; :latest is stable again. - Health check uses the CalDAV port (8800) now that the management port (8001) is no longer exposed. async-httpx job: - Add Baikal as a service so the httpx-fallback path is tested end-to-end against a real server (previously only unit tests ran for this backend). Rename "async (niquests fallback)" → "async (niquests)" to reflect that niquests is now the default install, not a fallback. Add comment block explaining why the async-* jobs exist separately from the main tests job. prompt: fix the github ci failures for scheduling tests followup-prompt: github runs still fail, please investigate followup-prompt: github test runs still fail, please investigate Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
…CE-ID fallback
Async test generators (ev1, ev2, todo1, todo2) now produce a fresh uuid4 per
call. Fixed UIDs caused UNIQUE constraint violations on Nextcloud because
deleted objects stay in oc_calendarobjects with a deleted_at timestamp until
the trashbin is purged.
async_calendar and sibling fixtures are refactored to use stable cal_ids.
At teardown, servers where delete-calendar.free-namespace is unsupported
(Nextcloud trashbin) now call calendar.delete(wipe=True) instead of HTTP
DELETE to keep the trashbin empty and the database fast. The async_task_list
sharing-with-Cyrus workaround is removed — wipe-at-teardown guarantees UIDs
are gone before the sync suite runs.
test_object_by_uid generates a random UID and deletes it at the end so
repeated runs don't collide.
testRecurringDateWithExceptionSearch: fall back to DTSTART when RECURRENCE-ID
is absent (RFC 4791 §9.6.5 permits servers to omit it on the initial expanded
instance).
Sync _cleanup: add missing return after wipe-calendar branch so the cleanup
does not fall through to cal.delete() and delete the calendar anyway.
_fixCalendar: give VJOURNAL-only calendars a distinct cal_id ("-journals")
so they don't collide with VTODO-only calendars ("-tasks") under the
wipe-calendar regime where calendars persist across tests.
Unify wipe logic: the three manual wipe loops in _cleanup/_fixCalendar are
replaced with cal.delete(wipe=True), which now lives only in collection.py.
test_servers: register Baikal URL_ENV_VAR so the async-httpx CI job can
reach it; add get_available_servers() helper used by async integration tests.
prompt: github runs fail — async/sync UID conflicts and 513 setup errors
prompt: wipe async test calendars instead of deleting them
followup-prompt: wipe-calendar cleanup must not fall through to cal.delete()
followup-prompt: github test runs still fail, please investigate
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
…ility guard Cyrus hints: - Remove incorrect save-load.event.recurrences.exception: unsupported flag added in an earlier commit. The caldav-server-tester confirms the feature works; the flag was causing search.py to force server_expand=True on all expand searches for Cyrus, breaking testTodoDatesearch and testRecurringDateWithExceptionSearch. - Remove stale search.recurrences.expanded.exception quirk hint (omitted RECURRENCE-ID on first expanded occurrence). The :latest Cyrus image includes RECURRENCE-ID on all instances; quirk was image-version-specific. - Add save-load.event.recurrences.exception: unsupported for Cyrus because it splits exception VEVENTs into separate calendar object resources, preventing correct client-side RECURRENCE-ID reconstruction. - Add scheduling.schedule-tag.stable-partstat: unsupported (Cyrus changes Schedule-Tag on attendee PARTSTAT-only updates, violating RFC 6638 §3.2). Nextcloud hints: - Add test-calendar cleanup-regime: wipe-calendar so the test suite wipes objects rather than deleting the calendar (avoiding the trashbin). Xandikos / Stalwart: - Mark search.recurrences.expanded.exception as supported (previously documented bugs appear fixed in current versions). testCheckCompatibility: snapshot _server_features.keys() before calling dotted_feature_set_list(compact=True). compact=True triggers collapse(), which mutates _server_features by removing subfeatures that roll up into a parent, causing the "feature never tested" guard to silently skip assertions for those features. prompt: save-load.event.recurrences.exception is found to be working — fix the hints prompt: testCheckCompatibility passes even when matrix disagrees with observations — why? followup-prompt: please fix Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
ec47e75 to
7400ca4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempts on catching local errors in github runs.
I leave all the github ci logic to Claude, it's not my thing. Based on the commit message, it seems to be running in the wrong direction on this one.
prompt: async tests towards baikal is currently broken locally - but the github workflow run passes successfully. Is it regressions in the niquests library, or are the baikal tests not run at github? Use
ghtool to get logs from the github runs. rather look into how we can get the async integration tests running at github - I've made a new branch for it. Apply and commit.