-
Notifications
You must be signed in to change notification settings - Fork 150
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
Ignore unrelated errors in migrations #186
Comments
I'm also currently running into |
I am running into the same issue when modifying a content type that has a link to an entry with an image into that linked entry to get the image itself. When running into broken references to images, the migration fails and the content model ends up being half-modified since the first steps of the migration are indeed executed but not the ones after the step with the entities that do not resolve, which is most likely the least desirable state. |
I have the same issue. any updates here? |
Hi Contentful Team no answer yet , this issue is 5 years open. Every time im facing an issue like that I have to impolite some exclude list handling to deal with that. Not only an ignore error switch would be nice to have , also an error report which entry has been skipped. |
Expected Behavior
There is some override or catching mechanism within a migration block that can ignore errors (such as notResolvable) that are not related to the data being migrated.
Actual Behavior
Situation: I am migrating some text content (simple text change with transformEntries) and the contentType has a reference field to an asset (image). For 2 out of 2000+ entries there is a bad reference which fails the migration. I cannot change the content to fix those references because those are controlled by a different team. I am only able to migrate/edit the text fields. My migration fails because of these bad references that I cannot change.
Possible Solution
Is there, or can there be, a way (within the JS CLI migration tool) to 'ignore' exceptions and save content (override) or to catch exceptions and ignore so that the entire migration is not marked as a failure.
This can be a flag on the migration CLI call:
or an additional option to transformEntries:
Steps to Reproduce
Context
I think the context was covered a bit in previous sections but essentially I need to apply a universal change to a text field and publish the updated text. The migration fails because of an unresolved reference (asset) unrelated to the change I am making.
I generally support the validation and think it should be on by default but really need there to be an override to accomplish what we are looking to do given there are many people's hands in the content and we cannot have our CI fail because one entry has a bad reference, it is ok if it gets skipped and we log the issue but other migrations need to run afterward which get blocked by this failure/validation.
Environment
The text was updated successfully, but these errors were encountered: