Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DockerCompose: wait logic inspect yaml #917

Merged
merged 10 commits into from Dec 8, 2022

Conversation

rukai
Copy link
Member

@rukai rukai commented Nov 17, 2022

Change the DockerCompose's wait logic to:

  1. parse the docker-compose.yaml to find what images each service uses.
  2. consult a hardcoded list that associates images with a required log substring.
  3. wait until each service's log contains the required string for the image it uses.

This new implementation is more robust:

  • We can now increase the number of services in a docker-compose.yaml without it silently introducing intermittent failures.
  • Its also more convenient as we can create or move docker-compose.yamls without having to alter the hardcoded list.

However my main motivation was actually to allow restarting of docker-compose instances that have been stopped.
Without this rewrite it would be impossible to wait on a single service to start as we currently rely on a hardcoded number of services.

@rukai rukai force-pushed the docker_compose_wait_inspect_yaml branch 3 times, most recently from cf25a28 to 6891895 Compare November 17, 2022 09:17
@rukai rukai marked this pull request as draft November 17, 2022 09:17
@rukai rukai force-pushed the docker_compose_wait_inspect_yaml branch 3 times, most recently from 007b8b9 to 73c5992 Compare November 17, 2022 22:08
@rukai rukai marked this pull request as ready for review November 17, 2022 23:49
@rukai rukai requested a review from conorbros November 17, 2022 23:49
@rukai rukai force-pushed the docker_compose_wait_inspect_yaml branch from d366264 to 0e5f3fd Compare November 18, 2022 00:09
@github-actions
Copy link

1 benchmark regressed. 0 benchmark improved. Please check the benchmark workflow logs for full details: https://github.com/shotover/shotover-proxy/actions/runs/3493046489

  2 (2.00%) high mild
cassandra/tls_select    time:   [1.2366 ms 1.2725 ms 1.3130 ms]
                        thrpt:  [761.63  elem/s 785.82  elem/s 808.70  elem/s]
                 change:
                        time:   [+23.843% +29.005% +35.052%] (p = 0.00 < 0.05)
                        thrpt:  [-25.954% -22.483% -19.253%]
                        Performance has regressed.

@rukai rukai force-pushed the docker_compose_wait_inspect_yaml branch from 0e5f3fd to 38203af Compare November 18, 2022 00:41
@rukai rukai enabled auto-merge (squash) December 7, 2022 23:23
@rukai rukai merged commit 7c4966d into shotover:main Dec 8, 2022
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.

None yet

3 participants