-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Prisma deploy error in production but no data in the log #12856
Comments
What commands exactly are you running there? The output is a bit unexpected to us. |
Not sure if related, but we were also getting errors with this specific code for a failed migration:
Not sure if we did anything wrong here, but I would have assumed the logs should indicate what exactly failed 🤔 Is this the expected output for failed migrations, or did I miss something? We are using version |
No, obviously a failing migration should output the actual failure message. Do you still have the failing migration (SQL), and maybe the state of the tables (SQL) before that? It would be optimal for us if we can reproduce running the same |
Great to hear that my expectations aren't too off here. I will try to come up with a reproduction the next few days ✌️ |
@janpio it seems to work like expected, I tried to setup a reproduction at https://github.com/Onlim/prisma-repro and it outputs a more useful error message the first time:
When retrying
So like I assumed I just missed the logs for the first run of |
Not noise at all, we need to fix this! You should never end up in a situation where the CLI tells you |
To be honest that's also something which surprised me. Coming from rails world when a migration fails it is not recorded in the migrations table and therefore you don't have to rollback a failed migration. By default, a migration either succeeded completely or not at all (as it is per default run in a transaction, you have to explicitly opt out of the "save" behavior). This is out of the scope of this issue though as I've read various other tickets which talk about this. |
for failed migrations when trying to deploy with failed migrations. We can't guarantee there will be logs. closes prisma/prisma#12856
Today we deployed in production and we get an error
When we checked the logs in
_prisma_migrations
, no issued was found and the migration was successfully applied.It looks like the NPM warning triggered this wrong error message. (NPM 8.7.0 was released 2 days ago) https://www.npmjs.com/package/npm
Full Log:
The text was updated successfully, but these errors were encountered: