Skip to content

feat: tracking issues with calendar subscriptions - #63298

Open
madbob wants to merge 1 commit into
nextcloud:masterfrom
madbob:issue_calendar_7068
Open

feat: tracking issues with calendar subscriptions#63298
madbob wants to merge 1 commit into
nextcloud:masterfrom
madbob:issue_calendar_7068

Conversation

@madbob

@madbob madbob commented Aug 16, 2026

Copy link
Copy Markdown

Summary

Targeting nextcloud/calendar#7068

As calendar subscriptions' refresh happens asyncronously to the web client, it is not possible to immediately inform the user about issues (error in connection, in parsing, in configuration and so on). On the other side, the actual implementation fails almost silently, occasionally leaving a few traces in the system log.

The proposed change involves a new database column where to save the status of the latest refresh, so to retrieve it and deliver to the client at his next request (this has to be implemented in Calendar's interface).

This PR is not complete: the detail is saved in the database, but not incapsulated into the DAV response about the status of calendars. I have still to figure out which lovecraftian demon have to invoke to pack this in the Sabre-generated payload, and before I have to guess which part of the DAV schema is the more appropriate to carry this kind of information.

Feedback about this approach, and hints about the Sabre/DAV black magic ritual to fulfill, are both appreciated.

Checklist

@madbob
madbob requested review from CarlSchwan, come-nc, icewind1991 and salmart-dev and removed request for a team August 16, 2026 01:01
@tcitworld

Copy link
Copy Markdown
Member

Nice! Another direction would be to save the date of last failed sync and numbers of retries so that retries have a exponential backoff and sync eventually stop trying for nothing.

@madbob
madbob force-pushed the issue_calendar_7068 branch from 6d87b22 to 2aeb5a3 Compare August 16, 2026 09:15
Signed-off-by: Roberto Guido <info@madbob.org>
@madbob
madbob force-pushed the issue_calendar_7068 branch from 2aeb5a3 to f0cd11b Compare August 16, 2026 15:18
Comment on lines 166 to 176
} catch (ParseException $ex) {
$this->logger->error('Subscription {subscriptionId} could not be refreshed due to a parsing error', ['exception' => $ex, 'subscriptionId' => $subscription['id']]);
$this->calDavBackend->trackSubscriptionError($subscription['id'], $ex, 'Parsing error');
} catch (LocalServerException $ex) {
$this->calDavBackend->trackSubscriptionError($subscription['id'], $ex, 'Subscription violates local access rules');
} catch (InvalidSubscriptionUrl $ex) {
$this->calDavBackend->trackSubscriptionError($subscription['id'], $ex, 'Invalid URL');
} catch (InvalidSubscriptionPayload $ex) {
$this->calDavBackend->trackSubscriptionError($subscription['id'], $ex, 'Invalid contents');
} catch (Exception $ex) {
$this->calDavBackend->trackSubscriptionError($subscription['id'], $ex, 'Network error');
} finally {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should only save a error identifier not the string, if the intent is to show the user the error, otherwise this would needed to be translated before its saved.

@SebastianKrupinski

Copy link
Copy Markdown
Contributor

I have still to figure out which lovecraftian demon have to invoke to pack this in the Sabre-generated payload, and before I have to guess which part of the DAV schema is the more appropriate to carry this kind of information.

I think we might be over complicating this... can we just send the user a notification?

Another direction would be to save the date of last failed sync and numbers of retries

Yes this would be a good option, and then just auto remove the subscription if its failed x amount of times or for x amount of days... basically automated clean up

@madbob

madbob commented Aug 16, 2026

Copy link
Copy Markdown
Author

A notification is permanent, a connectivity issue may be temporary. Once the notification is issued, it stays on the tray.

I'm not really persuaded about the idea to arbitrarily delete user's data.

@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@joshtrichards joshtrichards added bug 3. to review Waiting for reviews feature: caldav Related to CalDAV internals community pull requests from community labels Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug community pull requests from community feature: caldav Related to CalDAV internals feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants