Version
main
Describe the bug.
make core/tests waits for PostgreSQL with pg_isready, but the probe does not
select a host. The official PostgreSQL image briefly starts a socket-only server
while it initializes the database, stops that server, and then starts the final
TCP server.
So, postgres-wait can accept the temporary server and move on too early. The
extension check then races that server's shutdown, and the helper fails before
Cargo starts even though PostgreSQL would otherwise become ready normally. One
PR session recorded 16 of these pre-Cargo helper failures.
I expected the helper to wait for the final TCP server while keeping the current
make core/tests TEST_ARGS=... interface, image override, random loopback port,
and exact container cleanup unchanged.
Minimum reproducible example
make core/tests TEST_ARGS="-p carbide-api-db"
The failure is intermittent because it depends on observing the temporary
server during the initialization handoff.
Other/Misc.
Selecting 127.0.0.1 for the readiness probe makes the probe wait for the final
server: the temporary initialization server does not listen on TCP, while the
server used by the published host port must.
Version
mainDescribe the bug.
make core/testswaits for PostgreSQL withpg_isready, but the probe does notselect a host. The official PostgreSQL image briefly starts a socket-only server
while it initializes the database, stops that server, and then starts the final
TCP server.
So,
postgres-waitcan accept the temporary server and move on too early. Theextension check then races that server's shutdown, and the helper fails before
Cargo starts even though PostgreSQL would otherwise become ready normally. One
PR session recorded 16 of these pre-Cargo helper failures.
I expected the helper to wait for the final TCP server while keeping the current
make core/tests TEST_ARGS=...interface, image override, random loopback port,and exact container cleanup unchanged.
Minimum reproducible example
make core/tests TEST_ARGS="-p carbide-api-db"The failure is intermittent because it depends on observing the temporary
server during the initialization handoff.
Other/Misc.
Selecting
127.0.0.1for the readiness probe makes the probe wait for the finalserver: the temporary initialization server does not listen on TCP, while the
server used by the published host port must.