-
Notifications
You must be signed in to change notification settings - Fork 310
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
Respect depends_on conditions from docker-compose #2239
Comments
Just to add - the Compose Spec (which supersedes previous v2 and v3 formats) not only supports this, but requires it for compliance with the spec. We have some database migrations which rely on this feature, and they outright fail (and are not restarted as they're only meant to run once) because Tilt isn't waiting for the database to be healthy 😞 |
I encountered this today as well, and got a minimal sample to reproduce the issue. With the following
And a
But when doing
and we can see that the |
Just posting to try to keep this issue alive. We use Docker Compose and Tilt and have healthchecks, but resources fail to start because their dependencies aren't healthy yet, as "Tilt doesn’t currently observe docker-compose health checks". Engineers then have to repeatedly hit the reload button until the failed resources turns green. Any chance this issue gets some love @nicks ? |
…se (tilt-dev#2239) Signed-off-by: Kinland <16787581+kinland@users.noreply.github.com>
I took a stab at this and opened a PR - it's probably not the solution that the maintainers would want, but as far as I can tell (well, at the level of energy for testing I have at 3am anyway), it solves this problem without side effects. |
…se (tilt-dev#2239) Signed-off-by: Kinland <16787581+kinland@users.noreply.github.com>
Signed-off-by: Kinland <16787581+kinland@users.noreply.github.com>
…se (#2239) (#6329) * dockercompose: add wait_for_healthy optional argument to docker_compose (#2239) Signed-off-by: Kinland <16787581+kinland@users.noreply.github.com> * dockercompose: fix codegen / protobuf from previous commit Signed-off-by: Kinland <16787581+kinland@users.noreply.github.com> * rename wait_for_healthy to wait (#2239) Signed-off-by: Kinland <16787581+kinland@users.noreply.github.com> --------- Signed-off-by: Kinland <16787581+kinland@users.noreply.github.com>
For reference, this issue was raised in #2210.
When using a docker compose file with one or more
depends_on
including conditionsservice_healthy
, tilt does not check those conditions.depends_on
is a condition added in v2, and in v2.1 a conditionservice_healthy
was added to it.Example configuration:
With this configuration, mariadb and mongodb should be started first, then myServiceB and at last myServiceA.
Tilt is not respecting this, as it is not checking the
service_healthy
conditions.In docker compose v3 format,
depends_on
condition was removed altogether, but many companies are still using it, specially the ones that don't make use of Docker Swarm, so I think this should be supported by Tilt.The text was updated successfully, but these errors were encountered: