Skip to content

Don't wait forever for unhealthy dependencies#9092

Merged
ndeloof merged 1 commit intodocker:v2from
benesch:wait-hang
Jan 7, 2022
Merged

Don't wait forever for unhealthy dependencies#9092
ndeloof merged 1 commit intodocker:v2from
benesch:wait-hang

Conversation

@benesch
Copy link
Contributor

@benesch benesch commented Jan 7, 2022

@ndeloof I've got one more --wait-related fix for you here. Does the test case look ok?

What I did

The previous code would wait for dependencies to become healthy forever,
even if they'd become unhealthy in the meantime. I can't find an issue
report for this bug, but it was described in a comment on the PR that
introduced the --wait flag 0.

@ndeloof
Copy link
Contributor

ndeloof commented Jan 7, 2022

for legal reasons we require commits to be signed-off.
please git commit --sign-off --amend the force push to your branch

The previous code would wait for dependencies to become healthy forever,
even if they'd become unhealthy in the meantime. I can't find an issue
report for this bug, but it was described in a comment on the PR that
introduced the `--wait` flag [0].

[0]: docker#8777 (comment)

Signed-off-by: Nikhil Benesch <nikhil.benesch@gmail.com>
@benesch
Copy link
Contributor Author

benesch commented Jan 7, 2022

Whoops, sorry! I'm not in the habit. Fixed now.

@ndeloof ndeloof merged commit c5cdce0 into docker:v2 Jan 7, 2022
@felipecrs
Copy link

felipecrs commented Sep 14, 2022

What should I do to revert to the previous behavior? I have an Oracle container which can take since 2-10 minutes to become healthy, which includes some time during unhealthy state.

I had a pipeline which relied on that behavior, and since I upgraded the docker-compose, it stopped working because of this.

@felipecrs
Copy link

Nevermind. I think the correct thing to do is to adjust the healthcheck so that it does not report as unhealthy.

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.

3 participants