Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embargoed PDF (4MB) asset cannot be imported to new contentful environment #2073

Open
brad-telus opened this issue May 19, 2023 · 2 comments

Comments

@brad-telus
Copy link

brad-telus commented May 19, 2023

Hi everyone, my team is running into issues trying to import embargoed assets to another environment. It seems that contentful-cli cannot process any asset that is embargoed. The script will simply timeout while waiting for the asset import to finish.

Expected Behavior

A PDF asset file of moderate size (4MB) that is embargoed can be exported from one contentful environment to another environment by running these commands:

# export content
echo 'Exporting contentful environment'
contentful space export --space-id $space_id --environment-id $source --include-drafts true --content-file entries.json
echo 'Export complete'

# import content from source env to target env
echo "Importing contentful content to target environment [${target}]"
contentful space import --timeout 3600000 --space-id $space_id --environment-id $target --content-file entries.json --error-log-file error.json
echo 'Import complete'

Actual Behavior

The embargoed PDF asset cannot be imported to the target environment. Even with the --timeout flag set to an hour, the script will hang on the asset import until the timeout is reached:

"stacktrace": [
        "AssetProcessingTimeout: Asset is taking longer then expected to process.",
        "/usr/local/share/.config/yarn/global/node_modules/contentful-management/dist/contentful-management.node.js:11070:21",
        "process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
      ]

Possible Solution

the contentful CLI should sign any embargoed assets before exporting/importing.

Context

I am trying to export the assets from one contentful environment (e.g. a staging environment) to another (e.g. a production environment)

Environment

nodejs: v18.12.0
contentful-cli: v2.6.9

@hochoy
Copy link

hochoy commented May 19, 2023

Implementation for this will likely follow similar approach as the instructions in this link.
https://www.contentful.com/developers/docs/tutorials/general/embargoed-assets-getting-started/#rewriting-a-single-asset-url
Screen Shot 2023-05-19 at 3 45 17 PM

Or perhaps there's a bug.

@t849867
Copy link

t849867 commented May 23, 2023

This is for accessing embargoed assets from the CMA / CDA / CPA - this works fine for us for embargoed assets.

The issue we have is when migrating the content to a new environment using the CLI export and import command - the asset gets stuck on processing and even with --timeout set extremely high, the asset (~4MB) never migrates.

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

No branches or pull requests

3 participants