52651fd5

Author: Jake Keuhlen <jake@mercury.com>

Committer: GitHub <noreply@github.com>

ci: fix flaky MongoDB "Connection refused" failures (#1629)

* ci: fix flaky MongoDB "Connection refused" failures

The persistent-mongoDB test suite intermittently fails with
`Network.Socket.connect: ... does not exist (Connection refused)`.

Unlike postgres and mysql, which are declared as health-gated `services`
(the job blocks until they report healthy, and mysql has an extra explicit
connection check), MongoDB is started by an action step with no readiness
gate, and the test harness (MongoInit.runConn) connects once with no retry.
It was also started *before* the ~10 minute `cabal v2-build all`, leaving a
long window in which the mongod container could be resource-starved and
become unreachable by the time the tests ran.

- Move "Start MongoDB" to immediately before `cabal v2-test`, after the build.
- Add a readiness gate that waits for the port to accept connections (a plain
  TCP check, mirroring the exact failure mode, with no mongo-client dependency).
- Bump supercharge/mongodb-github-action 1.8.0 -> 1.12.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ci: retrigger CI

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GitHub

Total

3m24s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 1m24s 18s 18s 1m43s 1m24s
Eval 1m43s 3m05s 3m05s 4m49s 0s
Build - - - - -
Suite 1m24s 3m24s 3m24s 4m49s 1m24s

Timeline

Config Eval Failed Compressed gap
0s1m40s2m2m20s2m40s3m3m20s3m40s4m4m20s4m40s