Skip to content

feat: add opt-in bulk entry operations to space import - #3334

Draft
Esteban Fernandez (efgalione) wants to merge 2 commits into
contentful:mainfrom
efgalione:poc-bulk-operation-publish
Draft

Esteban Fernandez (efgalione) wants to merge 2 commits into
contentful:mainfrom
efgalione:poc-bulk-operation-publish

Conversation

@efgalione

Copy link
Copy Markdown

Summary

Adds an opt-in bulk entry import path for large Contentful restores, as proposed in #3331.

The new --use-bulk-entries flag:

  • Keeps content models, locales, tags, editor interfaces, and assets on the existing contentful-import path
  • Creates and updates entries through Bulk Entry Operations in batches of up to 10,000
  • Publishes previously published entries through Bulk Actions in batches of up to 200
  • Preserves --skip-content-updates, --skip-content-publishing, and --content-model-only
  • Reports an actionable error when Bulk Content Operations is not enabled

The existing import behavior remains unchanged unless the flag is explicitly enabled.

Design

  • Partitions entries into create and update groups using destination IDs and versions
  • Uses environment-scoped uploads
  • Polls asynchronous operations until completion or failure
  • Handles per-entry failures from completed bulk jobs
  • Runs bulk entry jobs sequentially because only one may be active per space
  • Does not silently fall back to classic entry imports after an entitlement error
  • Documents the decisions and trade-offs in an ADR

Usage

contentful space import \
  --space-id '<space-id>' \
  --environment-id '<environment-id>' \
  --content-file './export.json' \
  --use-bulk-entries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant