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

Failed migration puts you in an error state #28

Open
eriklindgren opened this issue Mar 25, 2021 · 4 comments
Open

Failed migration puts you in an error state #28

eriklindgren opened this issue Mar 25, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@eriklindgren
Copy link
Contributor

If you apply more than one migration at the same time, and the last one fails, the changes to the content model from the earlier ones will have been applied but no migration entries will have been created for them, so when you run cmp migrate again it will try (and fail) to re-apply them.

@eriklindgren eriklindgren added the bug Something isn't working label Mar 25, 2021
@tonioriol
Copy link
Contributor

Oh, missed that! Thanks for the report, will check asap.

@jacobhallenborgprototyp did you see that?

@eriklindgren
Copy link
Contributor Author

Thanks @tonioriol! I haven't checked the code, but I guess you should create the "Contentful migration entry" after each successfully applied migration, instead of creating them all at the end. Or I'm missing something and the problem is something else entirely 😅

@tonioriol
Copy link
Contributor

tonioriol commented Mar 30, 2021

Would you prefer that than to rollback all from the batch? (if there's a failure)

@eriklindgren
Copy link
Contributor Author

I think so. I probably would want to just fix the failing one and run it again. Also, I can easily rollback the committed ones with the rollback command if I want to. What do you guys think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants