You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ci): bound queue DB connections to stop E2E 1040 stalls
## Summary
### Why?
Tenant-scoped reconciliation fans out one goroutine per tenant per subscription tick. With `database/sql`'s unlimited open-connection default, the E2E stack opened more sockets than MySQL's ~151-connection ceiling, returned Error 1040, and stalled pipeline progress until Bazel timed out. Gateway integration also published logs under a tenant that was not in `MQ_TENANTS`, so the consumer never saw them.
### What?
- Apply `QUEUE_MYSQL_MAX_OPEN_CONNECTIONS` (default 16) on each service-owned queue `*sql.DB`, and keep that many connections idle so the cap does not churn sockets.
- Point the gateway log-consumer integration at the configured `test-queue` tenant and scope the land-message lookup by tenant.
- Upload Bazel `test.log` files on failure for every CI test job, with `actions: write` on the workflow token so `upload-artifact` can run.
## Test Plan
✅ `./tool/bazel test //service/messagequeue:go_default_test`
✅ `./tool/bazel test //test/integration/submitqueue/gateway:go_default_test --sandbox_writable_path="$HOME/.docker/buildx"`
✅ `./tool/bazel test //test/e2e/submitqueue:go_default_test --sandbox_writable_path="$HOME/.docker/buildx"` (167s, then 161s)
✅ `./tool/bazel test //test/e2e/submitqueue:go_default_test --test_filter='TestGitMergeE2E' --sandbox_writable_path="$HOME/.docker/buildx"`
✅ `make fmt && make gazelle && make tidy`
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments