Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sailfishos/buteo-sync-plugins-social
base: 15f5e978d9fa0875fa578c45069d351cb2a51218
Choose a base ref
...
head repository: sailfishos/buteo-sync-plugins-social
compare: 1b0b1e2721e0f997954e46b46568c0f9d4df5663
Choose a head ref
  • 8 commits
  • 4 files changed
  • 1 contributor

Commits on Jan 29, 2020

  1. [buteo-sync-plugins-social] Fix Google calendar event duplication. Co…

    …ntributes to JB#47783
    
    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
    Chris Adams committed Jan 29, 2020
    Copy the full SHA
    f058f4b View commit details
    Browse the repository at this point in the history
  2. [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.
    Chris Adams committed Jan 29, 2020
    Copy the full SHA
    b8563fb View commit details
    Browse the repository at this point in the history
  3. Ignore 403 ContentOperationNotPermitted errors due to shared calendars

    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.
    Chris Adams committed Jan 29, 2020
    Copy the full SHA
    6940f22 View commit details
    Browse the repository at this point in the history
  4. [buteo-sync-plugins-social] Discard spurious local modification due t…

    …o remote organizer change. Contributes to JB#47783
    
    If a local modification is reported as a change since the last sync,
    but the data in the event is identical to the data reported by the
    server for that event except for the organizer email address,
    then it is probably a spurious change (since Google will add the
    organizer email automatically).
    
    This commit detects that case and doesn't attempt to upsync the
    modification.
    Chris Adams committed Jan 29, 2020
    Copy the full SHA
    9426b48 View commit details
    Browse the repository at this point in the history
  5. [buteo-sync-plugins-social] Discard spurious local addition due to do…

    …wnsync. 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.
    Chris Adams committed Jan 29, 2020
    Copy the full SHA
    747fe3f View commit details
    Browse the repository at this point in the history
  6. [buteo-sync-plugins-social] Fix bugs in local delta calculation. Cont…

    …ributes to JB#47783
    
    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.
    Chris Adams committed Jan 29, 2020
    Copy the full SHA
    039257d View commit details
    Browse the repository at this point in the history
  7. Handle 410 errors by early-exiting sync

    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.
    Chris Adams committed Jan 29, 2020
    Copy the full SHA
    fb592dd View commit details
    Browse the repository at this point in the history
  8. Merge branch 'jb47783' into 'master'

    [buteo-sync-plugins-social] Fix Google calendar event duplication. Contributes to JB#47783
    
    See merge request mer-core/buteo-sync-plugins-social!54
    chriadam committed Jan 29, 2020
    Copy the full SHA
    1b0b1e2 View commit details
    Browse the repository at this point in the history