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.3.x #17739

Merged

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.3.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/subtly-super-bass branch 2 times, most recently from 8518935 to febe02a 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/subtly-super-bass branch from d6f0693 to f88310a Compare June 26, 2023 20:41
@shoenig shoenig merged commit 646d43f into release/1.3.x Jun 27, 2023
19 of 20 checks passed
@shoenig shoenig deleted the backport/docker-max-kill-timeout/subtly-super-bass branch June 27, 2023 13:13
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