Skip to content

smoketests: Fix server restarts and make more robust#2977

Merged
kim merged 3 commits into
masterfrom
kim/smoketests/fix-docker-restart
Jul 23, 2025
Merged

smoketests: Fix server restarts and make more robust#2977
kim merged 3 commits into
masterfrom
kim/smoketests/fix-docker-restart

Conversation

@kim
Copy link
Copy Markdown
Contributor

@kim kim commented Jul 23, 2025

Smoketests that restart the server became flaky recently as the readiness
probing was broken. This patch fixes the issue and makes the process more
robust, namely:

  • Label the compose services to check for readiness (i.e. spacetimedb
    processes) as app: spacetimedb.
  • When enumerating the containers, consider this label, as well as the
    current compose file.
  • For each spacetimedb container, try to "ping" all ports exposed on
    the host and succeed if one of them returns 200.
    Previously, we would assume a specific container port to be "the"
    spacetimedb port, which became false at some point.

Also re-enable zz_docker tests.

kim added 2 commits July 23, 2025 13:58
Smoketests that restart the server became flaky recently as the
readiness probing was broken. This patch fixes the issue and makes the
process more robust, namely:

- Label the compose services to check for readiness (i.e. spacetimedb
  processes) as `app: spacetimedb`.
- When enumerating the containers, consider this label, as well as the
  current compose file.
- Try to "ping" all ports exposed on the host for each spacetimedb
  container, and succeed if one of them returns 200.
  Previously, we would assume a specific container port to be "the"
  spacetimedb port, which became false at some point.
@kim kim force-pushed the kim/smoketests/fix-docker-restart branch from c0f42ad to 42ced60 Compare July 23, 2025 11:58
@kim kim requested review from bfops and jdetter July 23, 2025 12:59
Copy link
Copy Markdown
Contributor

@jdetter jdetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing the ping endpoint to see if SpacetimeDB is up rather than just looking at the docxker output seems like it would be a lot more consistent. Thanks Kim, approved with non-blocking question 👍

Comment thread docker-compose.yml
@kim kim added this pull request to the merge queue Jul 23, 2025
Merged via the queue into master with commit 6b9b0e3 Jul 23, 2025
25 of 26 checks passed
@kim kim deleted the kim/smoketests/fix-docker-restart branch July 23, 2025 17:49
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