1. 04 Mar, 2020 1 commit
  2. 29 Jan, 2020 6 commits
    • chriadam's avatar
      Handle 410 errors by early-exiting sync · fb592ddc
      chriadam authored
      This commit ensures that if the sync token or timeMin value for a
      notebook is invalid, we immediately abort sync, and then clear the
      sync token stored in the notebook's custom property as well as
      update the syncDate to an appropriate value.
    • chriadam's avatar
      [buteo-sync-plugins-social] Fix bugs in local delta calculation. Contributes to JB#47783 · 039257d4
      chriadam authored
      Store created/updated timestamps appropriate to ensure that filtering
      events for change or deletion since the last sync anchor works.
      Fix bugs in codepaths related to partial upsync artifacts, by ensuring
      that the event gcalId is calculated appropriately.
    • chriadam's avatar
      [buteo-sync-plugins-social] Discard spurious local addition due to downsync.... · 747fe3f4
      chriadam authored
      [buteo-sync-plugins-social] Discard spurious local addition due to downsync. Contributes to JB#47783
      Previously, we would determine that local additions caused by a
      downsync during the previous sync cycle should be treated as
      local modifications, and upsynced.
      This commit checks whether a local modification has indeed occurred
      by checking the lastModified date stamp, and if no modification has
      occurred, discarding the change to prevent spurious upsync.
      It also fixes a bug where the wrong "since" date time would be used
      when determining the local changeset, as it may be using one from
      a different notebook by mistake.  This commit updates the code so
      that the appropriate previous sync date for the specific notebook
      is used.
    • chriadam's avatar
      Ignore 403 ContentOperationNotPermitted errors due to shared calendars · 6940f22c
      chriadam authored
      Some changes (e.g. changing the organizer of an event in a shared
      calendar) are not allowed, even if the user has Owner access to the
      shared calendar (since the organizer field is managed specially
      by Google in the shared-calendar case, allowing only the organizer
      or the creator of the event to write changes there).
      If we hit such a failure, ignore it and allow sync to succeed.
    • chriadam's avatar
      [buteo-sync-plugins-social] Properly store the mapping between gcalId and... · b8563fb3
      chriadam authored
      [buteo-sync-plugins-social] Properly store the mapping between gcalId and local UID. Contributes to JB#47783
      Previously, we always stored an empty gcalId in the mapping.
      This could result in "known" partial upsync artifacts being
      ignored and re-upsynced, causing server-side event duplication.
    • chriadam's avatar
      [buteo-sync-plugins-social] Fix Google calendar event duplication. Contributes to JB#47783 · f058f4bb
      chriadam authored
      This commit fixes several issues which together could lead to errors
      which result in event duplication in some cases.
      - sync anchor timestamp is now stored exclusively in the notebook
        as the syncDate property, to avoid atomicity issues
      - sync anchor token is now stored exclusively in the notebook
        as a custom property (instead of account setting) to avoid
        atomicity issues
      - detection of server-side sync token invalidation has been
        improved, allowing the sync envelope to be tweaked appropriately
      - detection of events copied between calendars via Google web UI
        has been added, to ensure we don't attempt to store multiple
        events with the same UID (which could trigger a clean-sync cycle).
      It also bumps the plugin version to ensure that a clean sync will
      be triggered on the first run, to clean up any duplications which
      may have previously occurred.
      Contributes to JB#47783
  3. 13 Dec, 2019 1 commit
  4. 04 Oct, 2019 1 commit
    • chriadam's avatar
      [buteo-sync-plugins-social] Use SyncToken for Google Calendar delta sync. Contributes to JB#44316 · 126af928
      chriadam authored
      Previously, we used updatedMin timestamp "since" anchor to fetch
      changes since last sync.  This commit updates the plugin so that
      it uses the "sync token" which Google provides, so that we can
      more accurately fetch changes since the last sync, and avoid
      the "updatedMin too far in the past" problem which can be hit in
      certain circumstances.
      We store the sync tokens as account settings, as mkcal doesn't
      allow arbitrary metadata to be stored for notebooks.
  5. 13 Jun, 2019 1 commit
  6. 11 Jun, 2019 1 commit
  7. 18 Dec, 2018 2 commits
  8. 22 Nov, 2018 1 commit
  9. 24 Sep, 2018 1 commit
  10. 20 Jun, 2018 1 commit
  11. 09 Mar, 2018 1 commit
  12. 30 Jun, 2017 1 commit
  13. 28 Jun, 2017 1 commit
  14. 05 Sep, 2016 1 commit
    • chriadam's avatar
      [buteo-sync-plugins-social] Fix upsync of Google Calendar event removal. Contributes to JB#36033 · e3e17150
      chriadam authored
      In some cases (where the last-sync timestamp falls within 999 msecs of
      when a downsynced event is stored to the database) a local deletion
      of that event wouldn't have been upsynced appropriately, due to mkcal
      deletedIncidences() semantics.  This commit works around that issue
      by ensuring that we retrieve all such locally-deleted events which
      were created within the 1-second timeslice around the sync timestamp.
      Contributes to JB#36033
  15. 04 Mar, 2016 1 commit
    • chriadam's avatar
      [buteo-sync-plugins-social] Enforce C locale when generating timestamp... · 9a0b2a86
      chriadam authored
      [buteo-sync-plugins-social] Enforce C locale when generating timestamp strings. Contributes to MER#1536
      When generating timestamps for consumption by remote servers, the
      server will expect the timestamps to be formatted as RFC-compliant
      datetime strings. Those invariably require Latin1 alphanumeric
      This commit ensures that we use the C locale when generating such
      strings, to avoid non-Latin1 number-characters from being used.
      Contributes to MER#1536
  16. 26 Feb, 2016 1 commit
  17. 01 Feb, 2016 1 commit
    • chriadam's avatar
      [buteo-sync-plugins-social] Fix Google Calendar synchronization issues. Contributes to JB#33080 · dd021f1a
      chriadam authored
      This commit fixes several issues related to both downsync and upsync
      with Google Calendar service.
      a) sequence (revision) field is now enforced by Google server.
         This commit ensures that we parse it correctly.
      b) updatedMin must be no older than about 20 days if we request
         deleted events from Google, otherwise Google will respond with
         a 410 GONE error.  This commit now handles this by triggering
         a clean sync in that case, and by ensuring that we store a
         better "last sync date" in the notebook metadata (previously,
         we just used the timestamp reported by Google - but then if
         a notebook wasn't modified for more than a month, we'd start
         spontaneously hitting this error).
      c) error reporting has been improved to work around the newline
         restriction in the journal.  Full error information should now
         be visible in the log.
      Contributes to JB#33080
  18. 28 Oct, 2015 4 commits
  19. 15 Sep, 2015 2 commits
  20. 17 Jul, 2015 1 commit
  21. 14 Jul, 2015 1 commit
    • chriadam's avatar
      [buteo-sync-plugins-social] Improve clean sync of Google Calendars. Contributes to MER#1162 · 44d90297
      chriadam authored
      This commit ensures that we don't delete the gcal.ini file on package
      upgrade, which we previously did (which would then trigger a clean
      sync cycle on next synchronization).
      It also ensures that when a clean sync does occur (eg, due to error)
      that we re-use the same notebook UID after recreating the notebook,
      to ensure uid continuity for other applications (eg Calendar App).
      Contributes to MER#1162
  22. 26 Jun, 2015 1 commit
    • chriadam's avatar
      [buteo-sync-plugins-social] Improve server-side change detection. Contributes to MER#1121 · e404d908
      chriadam authored
      This commit does two things:
      1) ignores changes if they're spurious (eg a change to something we
         don't sync)
      2) compares the last-seen etag of the event (as reported by the server)
         to the previously-seen one, to determine whether the change is more
         recent than the previous sync.
      We need to do (2) because of the loss of precision of mKCal::Notebook
      syncDate() versus the last-modified timestamp reported by Google.
      Contributes to MER#1121
  23. 05 Jun, 2015 1 commit
  24. 29 Apr, 2015 1 commit
    • chriadam's avatar
      [buteo-sync-plugins-social] Remove libsocialcache usage from Google Calendar... · 77c4c903
      chriadam authored
      [buteo-sync-plugins-social] Remove libsocialcache usage from Google Calendar sync. Contributes to MER#916
      This commit removes any usage of libsocialcache from the Google
      Calendar sync adapter.  This means that sync is more robust and
      less prone to problems due to improved atomicity.
      Contributes to MER#916
  25. 20 Apr, 2015 1 commit
  26. 13 Apr, 2015 1 commit
    • chriadam's avatar
      [buteo-sync-plugins-social] Set summary+description info into Google... · 7d744e2c
      chriadam authored
      [buteo-sync-plugins-social] Set summary+description info into Google Calendars. Contributes to MER#884
      Previously, we hardcoded calendar summary information for calendars
      synced from Google.  Instead, we should use the summary and description
      provided by the server.
      Contributes to MER#884
  27. 30 Mar, 2015 1 commit
  28. 15 Jan, 2015 2 commits
  29. 14 Jan, 2015 1 commit
    • Chris Adams's avatar
      [buteo-sync-plugins-social] Fix Google Calendar recurrence sync · ad41bcc7
      Chris Adams authored
      When a single occurrence of a recurring event is deleted on device,
      it is marked as an exception datetime for the original event.
      Previously, we only upsynced EXDATE values, not EXDATETIME values,
      and similarly we only upsynced RDATE and not RDATETIME values.
      This commit ensures that all four are upsynced correctly.
      This commit also ensures that when recurrence rules are parsed for
      an event, the recurrence information for the event is cleared before
      setting the parsed data, to avoid RRULE duplication after sync.