contentful / contentful-cli

The official Contentful command line interface. Use Contentful features straight from the command line!
https://www.contentful.com/developers/docs/tutorials/cli/
MIT License
328 stars 62 forks source link

`contentful space import` is stuck #2157

Open slash3b opened 1 year ago

slash3b commented 1 year ago

Expected Behavior

I expect contentful space import to not be stuck

Actual Behavior

Please see attached screenshot. After some time contentful space import is stuck. File that is being imported is relatively large ~800Mb.

Possible Solution

Steps to Reproduce

I am aiming to do a backup of the whole environment, so that later we can re-import.

  1. Do a full export with command (note environment name):
    contentful space export --space-id=************ --environment-id=A --max-allowed-limit=300 --management-token=CFPAT-******************** --content-file=dump.json --include-drafts=true --use-verbose-renderer=true
  2. Observe json file is created when export finished its work.
  3. Size of a file is quite big ~800Mb
  4. Attempt to import with command(using another environment cloned from A):
    contentful space import --space-id=******** --environment-id=B_env_cloned_from_A --content-file=dump.json --management-token=CFPAT-********* --skip-content-publishing=true
  5. Observe import being stuck. I let it run for oven an hour, and nothing changed 🤷 Screenshot 2023-07-06 at 16 41 51

Context

I am trying to do a full backup of environment for a given space. This backup is necessary for when something gets broken and we need to restore the whole environment. This is, of course, is to be used on production.

Environment

loolooii commented 8 months ago

I'm having a similar problem when importing. It gets stuck in Importing Assets step. It says Rate limit error occurred. Waiting for 1572 ms before retrying... but it never continues. Screenshot 2024-01-16 at 14 53 45

restfulhead commented 8 months ago

I'm seeing the same issue as loolooii. It's stuck during the "Import Assets" step after a rate limit error occurred.

Update: Import actually continued and finished after waiting for a long time.

loolooii commented 8 months ago

@restfulhead how long are we talking about? Like an hour?

restfulhead commented 8 months ago

@loolooii Maybe like 20 mins for 150 assets. Not sure, didn't time it. But 95% of the time is spent in the "rate limit waiting state". So either the rate limit is really low, or maybe there's a bug in the "waiting" code.

GregerGu commented 4 months ago

Did anyone resolve this? I am having the same problem. I am moving over 3000 assets, so I can not wait 20min for 150 assets

jonskeen commented 3 months ago

Also having the same problem. It's frustrating that the first party tool is misbehaving for something that seems quite common.