Skip to content

v1.2.1

Compare
Choose a tag to compare
@gburgett gburgett released this 09 Aug 20:39
· 149 commits to master since this release

Changelog From v1.2.0 To 9f5873c

#265 Sync Engine: Exponential Backoff for Retries @gburgett merged 2022-08-09
  • Implements an exponential backoff algorithm for the sync engine job, with configurable parameters.

The Contentful CDN aggressively caches content, and it often happens that a Webhook will be sent and processed before the Sync API is able to provide the new content. This results in a Sync that does not include the entry indicated in the webhook (passed to the job via the up_to_id parameter.) In this case, the following lines appear in the logs, and the job is re-enqueued for 10 minutes later (Changed to 10 seconds in 2bc755a, not yet released)

INFO -- : [ActiveJob] [WCC::Contentful::SyncEngine::Job] [8447dd93-0be7-49e9-a7fb-66804f4a3fa4] WCC::Contentful::Event::SyncComplete
INFO -- : [ActiveJob] [WCC::Contentful::SyncEngine::Job] [8447dd93-0be7-49e9-a7fb-66804f4a3fa4] Synced 0 entries.  Next sync token:
  FEnCh...
INFO -- : [ActiveJob] [WCC::Contentful::SyncEngine::Job] [8447dd93-0be7-49e9-a7fb-66804f4a3fa4] Should enqueue again? [true]

10 minutes is far too long a time to wait. This PR more agressively hits the Sync API to try to catch the CDN update as soon as possible. Now, if the changed entry is not present on the Sync API yet, the SyncEngine::Job will retry after 1 second, then 2 seconds, then 4 seconds, for a total of 4 attempts over 7 seconds before giving up.

#263 Upgrade rubocop @gburgett merged 2022-07-01
  • Upgrades Rubocop to the latest 1.x version
  • Responds to new cops
  • Marks gem's required ruby version as >= 2.7 (Support for < 2.7 was dropped in v1.2.0)
#262 Deprecate and remove wcc-contentful-graphql @gburgett merged 2022-07-01

This gem is using an outdated version of the GraphQL gem and is no
longer useful. If we want to reconstitute it, we should re-write it
from scratch using the latest version of the GraphQL gem.

Issues closed in this release:

    • created by @