Commit Graph

2688 Commits

Author SHA1 Message Date
Corentin Henry 41c0eb7e80 fix exec_start() documentation
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 15:16:17 -08:00
Corentin Henry 76447d0ca3 tests various exec_create/exec_start combinations
Test the interation of the tty, demux and stream parameters

Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 13:37:17 -08:00
Corentin Henry 6540900dae add tests for _read_from_socket
Check that the return value against the various combination of
parameters this function can take (tty, stream, and demux).

This commit also fixes a bug that the tests uncovered a bug in
consume_socket_output.

Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 13:37:10 -08:00
Corentin Henry 5f157bbaca implement stream demultiplexing for exec commands
fixes https://github.com/docker/docker-py/issues/1952

Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-27 17:01:48 -08:00
Joffrey F e1e4048753
Merge pull request #2183 from docker/c6356-longpath-prefix
Correctly handle longpath prefix in process_dockerfile when joining paths
2018-11-26 17:45:48 -08:00
Joffrey F 114630161a Correctly handle longpath prefix in process_dockerfile when joining paths
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-26 17:34:26 -08:00
Joffrey F f3231a1ebb
Merge pull request #2178 from little-dude/fix_deprecation
tests: fix failure due to pytest deprecation
2018-11-26 16:39:12 -08:00
Corentin Henry 493d7f0f30 tests: bump pytest-timeout
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>

pytest-timeout 1.2.1 seems to be incompatible with pytest 3.6.3:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/_pytest/main.py", line 185, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/_pytest/main.py", line 225, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/hooks.py", line 284, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/manager.py", line 67, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/manager.py", line 61, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/_pytest/main.py", line 246, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/hooks.py", line 284, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/manager.py", line 67, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/manager.py", line 61, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 182, in _multicall
INTERNALERROR>     next(gen)  # first yield
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pytest_timeout.py", line 76, in pytest_runtest_protocol
INTERNALERROR>     timeout_setup(item)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pytest_timeout.py", line 104, in timeout_setup
INTERNALERROR>     timeout, method = get_params(item)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pytest_timeout.py", line 162, in get_params
INTERNALERROR>     timeout, method = _parse_marker(item.keywords['timeout'])
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pytest_timeout.py", line 178, in _parse_marker
INTERNALERROR>     if not marker.args and not marker.kwargs:
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/_pytest/mark/structures.py", line 25, in warned
INTERNALERROR>     warnings.warn(warning, stacklevel=2)
INTERNALERROR> RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly.
INTERNALERROR> Please use node.get_closest_marker(name) or node.iter_markers(name).
INTERNALERROR> Docs: https://docs.pytest.org/en/latest/mark.html#updating-code
2018-11-21 18:29:02 -08:00
Corentin Henry 47c10aa383 tests: fix failure due to pytest deprecation
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-21 17:17:50 -08:00
Joffrey F f7a1052b2b Fix versions script to accept versions without -ce suffix
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 18:58:06 -08:00
Joffrey F 302cb78f87
Merge pull request #2172 from docker/fix_docs
Documentation fixes
2018-11-08 18:10:09 -08:00
Joffrey F 35b9460748 Remove prematurely committed file
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 17:38:59 -08:00
Joffrey F 852d79b08d Fix file mode in image.save examples
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 17:32:33 -08:00
Joffrey F cebdee4aef Add doc example for get_archive
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 17:31:22 -08:00
Joffrey F f83fe7c959 Properly convert non-string filters to expected string format
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 17:22:24 -08:00
Joffrey F 89ee08f511 Disallow incompatible combination stats(decode=True, stream=False)
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 17:13:19 -08:00
Joffrey F b927a5f62c Fix incorrect return info for inspect_service
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 17:08:41 -08:00
Joffrey F 6bfe4c9090 Document attr caching for Container objects
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 17:05:42 -08:00
Joffrey F 6064947431 Update links docs and fix bug in normalize_links
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 16:55:58 -08:00
Joffrey F d5bc46ad45 Improved LogConfig documentation
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 16:20:28 -08:00
Joffrey F 1d124a1262 Improve ulimits documentation
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 15:32:10 -08:00
Joffrey F 9987c1bc42 Fix docs examples to work with Python 3
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-08 15:05:22 -08:00
Joffrey F 5467658bbc
Merge pull request #2169 from docker/2124-image-save-with-name
Add named parameter to image.save to identify which repository name to use in the resulting tarball
2018-11-08 12:50:03 -08:00
Joffrey F e237c0ea16 Add named parameter to image.save to identify which repository name to use in the resulting tarball
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-06 14:46:37 -08:00
Joffrey F 7252086054
Merge pull request #2165 from docker/ssh_protocol_support
SSH protocol support
2018-11-06 11:09:00 -08:00
Joffrey F c9bee7716f
Merge pull request #2168 from adamtheturtle/patch-1
Add a missing space in a log message
2018-11-04 22:57:57 -08:00
Adam Dangoor 490b2db3ae Add a missing space in a log message
Signed-off-by: Adam Dangoor <adamdangoor@gmail.com>
2018-11-05 00:11:59 +00:00
Joffrey F f302756599 Rewrite utils.parse_host to detect more invalid addresses.
The method now uses parsing methods from urllib to better split provided URLs.
Addresses containing query strings, parameters, passwords or fragments no longer fail silently.
SSH addresses containing paths are no longer accepted.

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:44:43 -07:00
Joffrey F 6bfe2005e0 Clear error for cancellable streams over SSH
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F 94aa9a89f7 Update tests to properly dispose of client instances in tearDown
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F 1df021ee24 Update tests for ssh protocol compatibility
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F f4e9a1dc2a Remove misleading fileno method from NpipeSocket class
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F 338dfb00b1 Add support for SSH protocol in base_url
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F 479f13eff1 Add paramiko requirement for SSH transport
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F dd7386de30 Update version detection script for CI
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:23:21 -07:00
Joffrey F a3111d9e00 Add xfail to ignore 18.09 beta bug
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-10-31 18:05:26 -07:00
Joffrey F b36124d91e
Merge pull request #2161 from docker/bump_requests
Bump requests dependency in requirements.txt (CVE-2018-18074)
2018-10-29 20:25:27 -05:00
Joffrey F e688c09d68 Bump requests dependency in requirements.txt (CVE-2018-18074)
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-10-29 14:46:27 -07:00
Joffrey F 8820e737c6
Merge pull request #2155 from docker/bump_pyopenssl
Bump pyopenssl to prevent installation of vulnerable version
2018-10-17 14:25:08 -07:00
Joffrey F 609045f343 Bump pyopenssl to prevent installation of vulnerable version
CVE refs:
CVE-2018-1000807
CVE-2018-1000808

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-10-17 13:52:39 -07:00
Joffrey F 567d552699
Merge pull request #2145 from mirake/fix-typos
Fix typo: Addtional -> Additional
2018-10-17 13:47:29 -07:00
Rui Cao 46a9b10b63 Fix typo: Addtional -> Additional
Signed-off-by: Rui Cao <ruicao@alauda.io>
2018-09-27 21:10:36 +08:00
Joffrey F 416ea74e3f
Merge pull request #2135 from docker/2133-services-docs
Fix docs for Service objects
2018-09-14 17:23:44 -07:00
Joffrey F 2b10c3773c Fix docs for Service objects
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-09-14 16:58:11 -07:00
Joffrey F 87352cd057
Merge pull request #2111 from bfirsh/document-defaults-of-logs
Document defaults of logs()
2018-09-14 16:42:09 -07:00
Joffrey F 02316eaf25
Merge pull request #2129 from adw1n/i2122-docs
Fix docs for `chunk_size` parameter
2018-09-14 16:40:58 -07:00
adw1n 74a293a9c9 Fix docs for `chunk_size` parameter
Closes #2122

Signed-off-by: Przemysław Adamek <adw1n@users.noreply.github.com>
2018-09-03 03:12:33 +02:00
Ben Firshman 67308c1e55
Document defaults of logs()
This is not obvious because some are True by default.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2018-08-12 13:01:02 +04:00
Joffrey F e78e4e7491 Add RollbackConfig to API docs
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-08-09 17:33:22 -07:00
Joffrey F 87d72c0f6c Misc release script improvements
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-08-09 17:28:35 -07:00