Even more consistent timeouts for all long-running APIs #991
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What do these changes do?
This PR extends the timeout configuration improvements from #990 by:
Making Docker API parameters explicit - Replaced
**kwargswith explicit parameters in container methods:DockerContainer.stop()- now acceptst(server-side graceful shutdown timeout),signal(signal to send), andtimeout(client-side HTTP request timeout)DockerContainer.restart()- now acceptst(server-side graceful shutdown timeout) andtimeout(client-side HTTP request timeout)DockerContainer.kill()- now acceptssignal(signal to send) andtimeout(client-side HTTP request timeout)DockerContainer.delete()- now acceptsforce,v(volumes),link, andtimeout(client-side HTTP request timeout)Exec.start(),DockerEvents.run()- now acceptstimeoutfor client-side HTTP request timeout with the default of infinite timeout like other methods updated in #983 and #990Documentation - Added detailed documentation explaining the distinction between Docker API parameters (like
tfor graceful shutdown) and HTTP request timeouts.New tests - Added three test cases that verify:
force=TrueparameterAre there changes in behavior for the user?
Warning
**kwargsnow have explicit parameters, which may break code that passes unexpected keyword argumentstparameter instop()andrestart()is now explicit instead of being part of**kwargstimeoutparameter ofDockerContainer.restart()method should update their codes to passtinstead.Improvements:
Related issue number
Continues work from #990
Checklist
CHANGESfolder