v2.4.2

purge

Cache purge, content transition, Manifold transition, and Slack PurgeBot entry points.

FieldValue
Serverless servicedrive-api-purge
Runtimenodejs22.x, arm64
Deployed HTTP operations6
Queue consumerspostTransitionProcess, purgeBotProcess
OpenAPI/openapi/purge.yaml · interactive

Deployed routes

FunctionMethodPathAuthInputOutput
postTransitionQueuePOST/post/transitionAPI keyPostTransitionRequestQueued or rejected transition object
manifoldTransitionQueuePOST/manifold/transitionAPI key{scope, environment}Batch queue result
purgeBotQueuePOST/purge/botPublicSlack slash-command form body or JSONSlack blocks response
purgeOriginPOST/purge/originAPI key{items: string[], requestId}purgeOriginResults[]
purgeGraphqlPOST/purge/graphqlAPI keyPurgeGraphqlRequestGraphQL purge response
purgeEdgePOST/purge/edgeAPI keyPurgeEdgeRequestCloudflare purge response plus optional cache-warm results

Queue consumers

FunctionTriggerPurpose
postTransitionProcessSQSConsumes post transition messages, invokes origin/edge/GraphQL purge functions, and publishes Athena index events.
purgeBotProcessSQSConsumes validated Slack PurgeBot messages and invokes origin/edge purge functions.

Behaviour notes

  • postTransitionQueue validates {id, url, postType} and host allow-list. Validation failures return HTTP 200 with result: "rejected" rather than 400.
  • postTransitionQueue publishes SNS to the post-transition topic for downstream consumers such as cmstosocial; SNS publish failure is logged but not fatal to the queue response.
  • manifoldTransitionQueue reads the last ingest timestamp from DynamoDB, queries Tailpipe GraphQL for updated makes, badges, models, and variants, then batches showroom-page transitions to SQS.
  • purgeOrigin expects items as URL strings, not {url} objects. It calls each URL with x-purge-cache and Cloudflare Access headers.
  • purgeGraphql builds GraphCDN/Stellate mutation payloads from purgeType; service selects purgeEndpoint<service>.
  • purgeEdge maps purge types to Cloudflare payload keys: Host -> hosts, Prefix -> prefixes, Tag -> tags, Url -> files.

Source map

  • Routes and queues: services/purge/serverless.yml
  • Handlers: services/purge/functions/
  • Post transition types: services/purge/types/
Esc