Drizzle 0.30.4 Missed Six PostgreSQL Parent Tables and Stalled the CI Pipeline

https://hackernoon.imgix.net/images/ATuRYnOn0QNfPpDbuAtt2kf63vE2-0y839aj.png

A deployment pipeline stopped at its migration step. A check of PostgreSQL activity showed no active queries and no sessions idle in transaction. The latest container log showed the immediate cause. drizzle-kit push 0.30.4 had opened an interactive menu inside a one-off migration job, where no operator could answer it.

The command that launched it was:

yes | npx drizzle-kit push

That looked like a non-interactive command. It actually supplied an endless stream of input that the menu did not treat as a submission. Removing push exposed a psql-only command and SQL that could not run twice. The migration ledger that replaced the old loop then introduced a baseline bug that could mark new migrations as already applied.

The migration job blocked the deployment

Earlier that evening I had changed the deployment workflow so a one-off container job ran the database migrations before the application deployment:

migrate: needs: builddeploy: needs:...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more