Skip to content

Conversation

@isoos
Copy link
Collaborator

@isoos isoos commented Oct 17, 2025

I've used the local postgres startup script from #8784 and updated with the following:

  • Enabled port-based connection (socket-based connection string is not yet implemented in package:postgres).
  • Created a new entrypoint script that uses the timeout command to auto-kill the process (and with that the docker container) after the specified time (6 hours).
  • Removed the process kill mechanism that relied on the command being not exiting.

With that, the local postgres instance can be auto-started by tests or local development, and it will automatically clean up after itself.

I've updated the initalization code to probe the network port, and if it exists, it will not run the startup script (it has some overhead otherwise). A future change may also test the socket for connections.

Each local test creates its own database, which is then deleted after the test has completed its run (the scope exists).

@isoos isoos requested review from sigurdm and szakarias October 17, 2025 17:17
@isoos isoos merged commit 155c09a into dart-lang:master Oct 20, 2025
43 of 44 checks passed
@isoos isoos deleted the local-postgres branch October 20, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants