bedrock/docs
Steve Jalim 35e60ae543
Contentful: switch to using SQS-based signalling rather than polling API every 5 mins (#10610)
* 10544: Add Contentful-SQS settings, from env vars

* Update documentation re test service lacking custom env vars

* 10544: Switch from polling Contentful directly to checking a message queue

Prior to this changeset, the update_contentful management command would immediately pull all content from Contentful and then decide whether the local DB needed updating or not.
This change was run every few minutes as part of run-db-update.sh, called by a clock process, and resulted in lots of API calls to Contentful, even though content may not have changed.

This changeset now first checks an SQS message queue for a notification from Contentful (put there via a separately configured webhook at the Contentful side each time content state changes). The messages are checked and, if the indicate that a content update is worthwhile, only _then_ is the previous set of API calls triggered.

The 'go' actions vary depending on whether this is in use on Dev/Stage or Prod, to allow Dev to pull in updated draft/preview content, too. Note that Dev needs a preview-compatible API key to work in DEV=True mode

Also note that the --force option now does two things:
 * [ADDED] poll contentful regardless of queue state
 * [RETAINED] update stored data even if the data hash matches

* 10544: Ensure we check the entire queue, not just the first 10 messages

...because our first 'go' signal might be 11+ messages deep in the queue

* 10544: A little tuning of the contentful importer + add MPL atop the code

* 10544: Add in tests for new contentful syncing logic

* 10544: minor typing tweak

* 10544: Make the update_contentful management command tolerant of absent config

If either Contentful or AWS SQS config is not provisioned (eg locally, or in an environment where we currently lack SQS config), we handle things gracefully so that we do not block the rest of any script that calls this command

* 10544: Remove duplicated MPL text

* 10544: Back out misleading documentation change
2021-10-25 22:37:50 +01:00
..
_static Bug 816080: Upgrade Bedrock to latest Playdoh 2013-05-15 11:14:13 -07:00
_templates Display Page titles in the Next and Previous buttons (fixes #5101) (#8662) 2020-03-19 11:39:22 +00:00
architecture/decisions Add an ADR for using a single docker image for all deployments (#9123) 2020-09-23 16:59:44 -04:00
images Initial l10n block docs for localizers. Still missing "else" clauses, developer docs, what happens when a block changes etc. pp. 2011-09-08 12:59:17 -07:00
Makefile Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
abtest.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
analytics.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
architectural-decisions.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
banners.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
browser-support.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
build-github.zsh Bug 816080: Upgrade Bedrock to latest Playdoh 2013-05-15 11:14:13 -07:00
coding.rst 10631: Reinstate support for python-coverage 2021-10-25 15:59:53 -04:00
conf.py 10570: Add isort support to project (#10573) 2021-10-11 18:08:58 +01:00
content-cards.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
contentful.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
contribute.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
download-buttons.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
firefox-accounts.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
fluent-conversion.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
funnelcake.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
index.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
install.rst Contentful: switch to using SQS-based signalling rather than polling API every 5 mins (#10610) 2021-10-25 22:37:50 +01:00
javascript-libs.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
l10n.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
mozilla-lazy-load.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
newsletters.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
pipeline.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
redirects.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
send-to-device.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
stub-attribution.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
testing.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00
uitour.rst Add pre-commit hook for including the MPLv2 in all source code files (#10617) 2021-10-22 13:09:44 +01:00