dev-server restart returned before the module database had begun opening #39
Labels
No labels
area:defold
area:docs
area:infra
area:protocol
area:testing
kind:bug
kind:chore
phase:breadth
phase:core
phase:hardening
phase:slice
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
yuris/spacetimedb-defold#39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while verifying PR #36. Not caused by that PR — reproduced against
mainand against the branch without its changes, and the same tree then passed six consecutive runs plus HTML5.Symptom
Native conformance failed once at phase 2:
The failing run shows a second disconnect (code 1001) and a second reconnect attempt that passing runs do not.
Mechanism
dev/tools/dev-server.sh'swait_readypolls/v1/pingfor a 200. That proves the HTTP port is answering. It does not prove the module database has finished reopening after arestart.So a client that reconnects the instant ping goes green can be served a subscription against a database still coming up. The SDK does the right thing and retries, but phase 2 asserts the row is restored within its budget, and the extra round trip can push it past that.
This is the same class of flakiness as the CI reconnect timing in #16, and it has the same shape: nothing is broken, the readiness probe is just weaker than what the test depends on.
Work
wait_readyprove the database is ready, not just the HTTP port. Aspacetime sql <db> "SELECT * FROM message LIMIT 0"or an equivalent cheap query against the actual module is the honest probe — it fails until the database is genuinely servingdev-server.sh restartWhy bother
A 1-in-8 flake in the harness that gates a release is worse than a slow harness. It also erodes the thing that makes this repo's conformance useful: when it goes red, the current default assumption is that something real broke. Every unexplained flake weakens that.
Related: #16 keeps
continue-on-erroron the HTML5 CI step partly because reconnect timing on the runner is slower than local. If this readiness race is the underlying cause of both, fixing it here may be what lets that flag come off.conformance: dev-server readiness probe races the database reopeningto dev-server restart returned before the module database had begun opening