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

Backport of drivers/docker: refactor use of clients in docker driver into release/1.4.x #17740

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #17731 to be assessed for backporting due to the inclusion of the label backport/1.4.x.

WARNING automatic cherry-pick of commits failed. Commits will require human attention.

The below text is copied from the body of the original PR.


This PR refactors how we manage the two underlying clients used by the
docker driver for communicating with the docker daemon. We keep two clients

One with a hard-coded timeout that applies to all operations no matter
what, intended for use with short lived / async calls to docker.

The other has no timeout and is the responsibility of the caller to set a
context that will ensure the call eventually terminates (except in the .Wait case).

The use of these two clients has been confusing and mistakes were made
in a number of places where calls were making use of the wrong client.

This PR makes it so that a user must explicitly call a function to get
the client that makes sense for that use case.

Fixes #17023

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/docker-max-kill-timeout/indirectly-powerful-terrapin branch from 357dcd0 to 792ec45 Compare June 26, 2023 20:22
@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/docker-max-kill-timeout/indirectly-powerful-terrapin branch from 792ec45 to 357dcd0 Compare June 26, 2023 20:22
@hashicorp-cla
Copy link

hashicorp-cla commented Jun 26, 2023

CLA assistant check
All committers have signed the CLA.

@vercel vercel bot temporarily deployed to Preview – nomad June 26, 2023 20:26 Inactive
@vercel vercel bot temporarily deployed to Preview – nomad-storybook-and-ui June 26, 2023 20:30 Inactive
(just the bug fix, not the refactoring)
@shoenig shoenig force-pushed the backport/docker-max-kill-timeout/indirectly-powerful-terrapin branch from 7d1bf10 to edb9626 Compare June 26, 2023 20:40
@shoenig shoenig merged commit e1e7277 into release/1.4.x Jun 27, 2023
20 checks passed
@shoenig shoenig deleted the backport/docker-max-kill-timeout/indirectly-powerful-terrapin branch June 27, 2023 13:12
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