-
Notifications
You must be signed in to change notification settings - Fork 0
fix(cli): setup scripts use docker mode + increase health timeout #397
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
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3010a1b
fix(cli): setup scripts use docker mode, increase health timeout
alfredorubin96 af31a5e
fix(cli): reliable setup — resolve DATABASE_URL, DBs-only compose, fa…
alfredorubin96 13eecfa
fix(cli): use execSync for dockerExec to preserve quoted Cypher queries
alfredorubin96 ab6ea2d
fix(cli): demo runs full Docker stack, setup runs DBs only
alfredorubin96 2eebf39
fix(cli): seed with Docker-internal hostnames for full-stack mode
alfredorubin96 7addc1d
fix(cli): harden DATABASE_URL parsing — strip quotes, URI-encode cred…
alfredorubin96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
For the drizzle-kit version used by this repository, doesdrizzle-kit migrateacquire a PostgreSQL advisory lock (or equivalent concurrency lock) to prevent concurrent migration runners?💡 Result:
I can’t tell what drizzle-kit version “this repository” uses unless you share the repo URL or paste the
drizzle-kitentry frompackage.json/ lockfile.That said, Drizzle Kit’s
migratehas historically not taken a PostgreSQL advisory lock (e.g.pg_advisory_lock/pg_advisory_xact_lock) to serialize concurrent runners—the Drizzle team explicitly described a future “proper lock mechanism” as something they will implement, implying it wasn’t present at the time of that design note/discussion. [1] The locks people commonly observe duringmigrateare standard PostgreSQL DDL locks (e.g., fromCREATE TABLE IF NOT EXISTS ... __drizzle_migrationsand other DDL), not an explicit migration-runner mutex. [2]If you paste your repo’s
drizzle-kitversion, I can verify more precisely for that version and (if needed) point you to how to confirm by searching the installed CLI code forpg_advisory_*.Sources
migrate()executions: “We will implement a proper lock mechanism…” [1]🏁 Script executed:
Repository: alfredo1996/neoboard
Length of output: 162
🏁 Script executed:
Repository: alfredo1996/neoboard
Length of output: 46
🏁 Script executed:
Repository: alfredo1996/neoboard
Length of output: 46
🏁 Script executed:
Repository: alfredo1996/neoboard
Length of output: 46
🏁 Script executed:
Repository: alfredo1996/neoboard
Length of output: 85
🏁 Script executed:
Repository: alfredo1996/neoboard
Length of output: 561
🏁 Script executed:
# Check cli/package.json for drizzle dependencies cat cli/package.jsonRepository: alfredo1996/neoboard
Length of output: 636
🏁 Script executed:
Repository: alfredo1996/neoboard
Length of output: 643
🏁 Script executed:
Repository: alfredo1996/neoboard
Length of output: 140
🏁 Script executed:
cat -n cli/src/__tests__/commands/db/migrate.test.ts | head -50Repository: alfredo1996/neoboard
Length of output: 1635
Add advisory locking to prevent concurrent migration races.
drizzle-kit migrate(version 0.31.10) does not implement PostgreSQL advisory locking. Running migrations concurrently can cause race conditions. Wrap the migration call withpg_advisory_xact_lock()or implement an equivalent serialization mechanism to comply with NeoBoard migration requirements.🤖 Prompt for AI Agents