Commit Graph

721 Commits

Author SHA1 Message Date
Joffrey F f679f77555
Merge pull request #5598 from carlwgeorge/mock-import-fix
Use mock compatibility import
2018-01-23 09:55:13 -08:00
Carl George 8b5d32373e Use mock compatibility import
`tests/__init__.py` already has a try/except statement to use mock from
the standard library when possible.  Take advantage of it like other
tests already do.

Signed-off-by: Carl George <carl@george.computer>
2018-01-22 23:10:50 -06:00
Joffrey F b968d34227 Advanced merge for deploy dict in v3 files
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-22 15:05:53 -08:00
Joffrey F fd1e8024f7
Merge pull request #5593 from docker/4651-tls-env-and-flags
Support mixed use of TLS flags and TLS environment variables
2018-01-22 11:01:44 -08:00
Joffrey F 593a675d2b Support mixed use of TLS flags and TLS environment variables
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-19 15:48:30 -08:00
Joffrey F 9ba9016cbc Improve ImageNotFound handling in convergence
- Improved CLI prompt
- Attempt volume preservation with new image config
- Fix container.rename_to_tmp_name()
- Integration test replicates behavior ; remove obsolete unit test

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-19 14:16:57 -08:00
Ian Glen Neal 4042121f6e The updated unit test simulates the error in the bug. What's happening
is that the container has an image sha (represented by
    'shaDOES_NOT_EXIST') which causes an error when client.inspect_image
is called on it, because the image has actually been removed.

Signed-off-by: Ian Glen Neal <ian.gl.neal@gmail.com>
2018-01-19 14:16:56 -08:00
Joffrey F 2d986dff79 Remove rebuild parameter ; set do_build instead
Reduce repetition in main.py

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-19 14:16:56 -08:00
Ian Glen Neal 7591639c72 Fix #5465 by catching a no-image exception in
get_container_data_volumes. The ImageNotFound exception is now bubbled
up to the client, which prompts the user on the desired course of action
(rebuild or abort). Added a case to the unit test to check that
an empty existing image doesn't result in an exception.

Closed old pull request #5466 because I did a rebase and it showed over
300 commits to merge, which I thought was messy.

Signed-off-by: Ian Glen Neal <ian.gl.neal@gmail.com>
2018-01-19 14:16:56 -08:00
Joffrey F 5d4ccafd35
Merge pull request #5580 from docker/5578-use_cli_exec
Use CLI for interactive exec on all platforms by default
2018-01-19 14:15:07 -08:00
Joffrey F a5d8c68d42 Also use docker CLI for interactive one-off runs.
COMPOSE_EXEC_NO_CLI -> COMPOSE_INTERACTIVE_NO_CLI

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-18 13:28:11 -08:00
Joffrey F 7f30a88bd6 Add type conversion (number, bool) -> float for label values
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-17 18:50:27 -08:00
Joffrey F c387d05a40 Merge branch '4904-label-config-validation' of https://github.com/nginth/compose into nginth-4904-label-config-validation
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-17 18:00:11 -08:00
Joffrey F 97da2cc6bb Add test for NoSuchService with unicode characters
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-12 13:57:40 -08:00
Joffrey F e174c3fd1c Revert -d/--timeout exclusion
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-11 12:37:46 -08:00
Joffrey F 39d535c1f5 Fix unicode errors in interpolation / serialization
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-09 17:05:12 -08:00
Joffrey F 1b39817172
Merge pull request #5531 from docker/5505-required-variables
Support ${VAR:?err} syntax for mandatory variables
2018-01-08 13:38:15 -08:00
Joffrey F e400c05de0 Support ${VAR:?err} syntax for mandatory variables
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-05 16:46:09 -08:00
Joffrey F c3b1bce42e
Merge pull request #5538 from docker/update_test_asserts
Replace unittest-style asserts with pytest asserts
2018-01-04 15:00:44 -08:00
Joffrey F b13ec16e11 Replace unittest-style asserts with pytest asserts
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-04 14:38:28 -08:00
Joffrey F b97b76d24f
Merge pull request #5537 from docker/Rozelette-branch_limit_test
Add configurable parallel operations limit
2018-01-04 13:04:27 -08:00
Joffrey F f22a1b6a2e Merge branch '5360-add-runtime-support' of https://github.com/cuckoohello/compose into cuckoohello-5360-add-runtime-support
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-04 12:33:39 -08:00
Joffrey F 8d3c7d4bce Clean up limit setting code and add reasonable input guards
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-04 12:16:46 -08:00
Joffrey F d582ae0009 Merge branch 'branch_limit_test' of https://github.com/Rozelette/compose into Rozelette-branch_limit_test
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-04 11:32:38 -08:00
Joffrey F 2d064614ac Gracefully handle errors and provide helpful error message in type conversion
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-03 14:02:05 -08:00
Ashlie Martinez acf76c15a2 Allow parallel limit to be set in env file.
Signed-off-by: Ashlie Martinez <ashmrtn@utexas.edu>
2017-12-16 19:50:55 -06:00
Ashlie Martinez dc6b464751 Do not bleed env values outside of test.
Signed-off-by: Ashlie Martinez <ashmrtn@utexas.edu>
2017-12-16 08:51:02 -06:00
Joffrey F fffcc05a8e Add stop_grace_period to ALLOWED_KEYS
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-11 11:03:19 -08:00
Shea Rozmiarek 48166a79c7 Add COMPOSE_PARALLEL_LIMIT to restrict global number of parallel operations
Signed-off-by: Shea Rozmiarek <uberpanzermensch@gmail.com>
2017-12-10 07:02:10 -06:00
Joffrey F d0644bdff8 Handle non-ascii characters in npipe error handler
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-08 14:16:14 -08:00
Joffrey F 5c0a06475c Expand mount source when type == bind
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-07 14:10:56 -08:00
Joffrey F 8155ddc7ad Add support for custom names for networks, secrets, configs
Finalize v3.5 schema

Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-06 16:48:14 -08:00
Joffrey F 79b20eb53f Add support for mount syntax
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-05 16:21:49 -08:00
Joffrey F ceec0595bd Allow port publish ranges
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-04 14:15:17 -08:00
Joffrey F 9098a67394
Merge pull request #5410 from sethktaylor11/5374-build-memory
Adds support for a memory build-arg in docker-compose build.
2017-12-04 14:00:09 -08:00
Yafeng Shan e4e92dd3d8 add support for `runtime` option in service definitions
close #5360

Signed-off-by: Yafeng Shan <cuckoo@kokonur.me>
2017-12-04 12:13:28 +08:00
Samantha Miller a6cdd62726 Adds support for a memory flag to docker-compose build.
Signed-off-by: Samantha Miller <samantha.a.miller123@gmail.com>
2017-12-03 13:59:32 -06:00
Joffrey F a204e50058
Merge pull request #5415 from docker/5377-secrets-mounts
Use mounts for secrets instead of volumes
2017-12-01 13:25:46 -08:00
Joffrey F 43fc651364
Merge pull request #5418 from nginth/5352-fix-volume-config
Add config validation for service volumes, fixes #5352
2017-12-01 12:19:23 -08:00
Drew Romanyk a1ac289943 Add label config validation, fixes #4904
Signed-off-by: Drew Romanyk <drewiswaycool@gmail.com>
2017-11-30 11:57:42 -06:00
Drew Romanyk bee6046043 Add config validation for service volumes, fixes #5352
Signed-off-by: Drew Romanyk <drewiswaycool@gmail.com>
2017-11-30 10:21:27 -06:00
Joffrey F 415fa6c59b Use mounts for secrets instead of volumes
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-29 12:21:56 -08:00
Joffrey F 58dcfac853
Merge pull request #5397 from sethktaylor11/4937-Labels
Added a label option to 'docker-compose run' and test.
2017-11-29 11:42:24 -08:00
Samantha Miller c36a2fb1ad Added a label option to 'docker-compose run' and test.
Signed-off-by: Samantha Miller <samantha.a.miller123@gmail.com>
2017-11-28 18:43:00 -06:00
Drew Romanyk badd4d764a Refactor subnet cidr validator & add new test
Signed-off-by: Drew Romanyk <drewiswaycool@gmail.com>
2017-11-13 21:53:14 -06:00
Drew Romanyk 6c8184d0d0 Add format to other v3 configs & remove unix dependency
Signed-off-by: Drew Romanyk <drewiswaycool@gmail.com>
2017-11-10 18:04:11 -06:00
Drew Romanyk 68c636d728 Fix subnet config test for windows
Signed-off-by: Drew Romanyk <drewiswaycool@gmail.com>
2017-11-09 23:41:42 -06:00
Drew Romanyk 5691b8241d Implement subnet config validation (fixes #4552)
Signed-off-by: Drew Romanyk <drewiswaycool@gmail.com>
2017-11-09 22:30:10 -06:00
Joffrey F d48002a09d
Merge pull request #5361 from docker/5282-build-extra-hosts
Add support for extra_hosts in build config
2017-11-09 16:30:35 -08:00
Joffrey F c5408f3a40 Add support for extra_hosts in build config
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-09 14:57:24 -08:00