Commit Graph

1515 Commits

Author SHA1 Message Date
Daniel Nephin b87c09b9fc Merge pull request #1824 from mrfuxi/run-with-ports
Allow manual port mapping when using "run" command
2015-08-13 08:29:25 -07:00
Aanand Prasad 2ddce83c8a Merge pull request #1854 from aanand/document-release-process
Fill out release process documentation
2015-08-13 10:46:12 +01:00
Karol Duleba ff87ceabbd Allow manual port mapping when using "run" command. Fixes #1709
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
2015-08-12 18:54:42 +01:00
Aanand Prasad 7d5e26bd37 Merge pull request #1857 from mnowster/mem-limit-validation
memory values can be strings or numbers
2015-08-12 17:48:55 +01:00
Mazz Mosley 440099754d memory values can be strings or numbers
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-12 17:29:33 +01:00
Aanand Prasad 711b0b4daf Merge pull request #1853 from aanand/only-use-overlay-in-ci
Only use overlay driver in CI
2015-08-12 17:05:59 +01:00
Aanand Prasad f1eef7b416 Fill out release process documentation
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-12 16:31:37 +01:00
mnowster c443e95f07 Merge pull request #1825 from aanand/dedupe-unset-env-warnings
Avoid duplicate warnings if an unset env variable is used multiple times
2015-08-12 15:57:04 +01:00
Aanand Prasad 4c65891db1 Avoid duplicate warnings if an unset env variable is used multiple times
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-12 15:39:33 +01:00
Aanand Prasad bcb977425b Only use overlay driver in CI
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-12 15:36:10 +01:00
Aanand Prasad 2134800cad Merge pull request #1852 from mnowster/fix-testsuite-post-some-merges
Fix ports validation
2015-08-12 15:31:59 +01:00
Mazz Mosley 5e2ecff8a1 Fix ports validation
I had misunderstood the valid formats allowed for ports. They must
always be in a list.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-12 15:19:28 +01:00
Aanand Prasad eea3b1cd6f Merge pull request #1850 from aanand/bump-1.5.0dev
Bump 1.5.0dev
2015-08-12 11:18:37 +01:00
Aanand Prasad ed31673069 Merge pull request #1827 from mnowster/port-ranges
Port ranges
2015-08-12 11:17:22 +01:00
Aanand Prasad fb4c9fbb8b Merge pull request #1808 from mnowster/129-validate-compose-yml
129 validate compose yml
2015-08-12 11:15:47 +01:00
Aanand Prasad 192dda4140 Bump 1.5.0dev
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-11 18:41:21 +01:00
Aanand Prasad 3e505e850f Merge pull request #1849 from moxiegirl/final-link-check
Fixing links after crawl
2015-08-11 18:14:01 +01:00
Mary Anthony d454a584da Fixing links after crawl
Signed-off-by: Mary Anthony <mary@docker.com>
2015-08-11 09:38:49 -07:00
Mazz Mosley 810bb70249 Include schema in manifest
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-11 16:31:56 +01:00
Aanand Prasad 93cc7e3751 Merge pull request #1846 from aanand/fix-mem-limit-options
Fix mem_limit and memswap_limit regression
2015-08-11 15:59:08 +01:00
Aanand Prasad 982a845635 Fix mem_limit and memswap_limit regression
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-11 14:17:30 +01:00
Mazz Mosley f8efb54c80 Handle $ref defined types errors
We use $ref in the schema to allow us to specify multiple type, eg
command, it can be a string or a list of strings.

It required some extra parsing to retrieve a helpful type to display
in our error message rather than 'string or string'. Which while
correct, is not helpful. We value helpful.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-11 13:08:12 +01:00
Mazz Mosley 68de84a0bf Clean up error.path handling
Tiny bit of refactoring to make it clearer and only pop service_name
once.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-11 12:01:27 +01:00
Mazz Mosley df14a4384d Catch non-unique errors
When a schema type is set as unique, we should display the validation
error to indicate that non-unique values have been provided for a key.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-11 12:01:27 +01:00
Mazz Mosley e0675b50c0 Retrieve sub property keys
The validation message was confusing by displaying only 1 level of
property of the service, even if the error was another level down.

Eg. if the 'files' property of 'extends' was the incorrect format,
it was displaying 'an invalid value for 'extends'', rather than
correctly retrieving 'files'.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-11 12:01:27 +01:00
Mazz Mosley ece6a72712 Clean error.message
Unfortunately the way that jsonschema is calling %r on its property
and then encoding the complete message means I've had to do this
manual way of removing the literal string prefix, u'.

eg:

key = 'extends'
message = "Invalid value for %r" % key
error.message = message.encode("utf-8")"

results in:

"Invalid value for u'extends'"

Performing a replace to strip out the extra "u'", does not change the
encoding of the string, it is at this point the character u followed
by a '.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-11 12:01:27 +01:00
Mazz Mosley b4872de213 Allow integer value for ports
While it was intended as a positive to be stricter in validation
it would in fact break backwards compatibility, which we do not
want to be doing.

Consider re-visiting this later and include a deprecation warning if
we want to be stricter.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-11 12:01:27 +01:00
Mazz Mosley 52733f6996 Merge pull request #1833 from aanand/deprecate-relative-volumes-without-dot
Show a warning when a relative path is specified without "./"
2015-08-11 11:21:17 +01:00
Ben Firshman b7baa899e2 Merge pull request #1829 from vlajos/typofixes-vlajos-20150807
typofix - https://github.com/vlajos/misspell_fixer
2015-08-10 22:13:30 +01:00
Ben Firshman afc9629c59 Merge pull request #1832 from aanand/use-docker-1.8.0-rc3
Test against Docker 1.8.0 RC3
2015-08-10 20:53:01 +01:00
Aanand Prasad 46e8e4322a Show a warning when a relative path is specified without "./"
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-10 19:56:36 +01:00
Ben Firshman 4e12ce39b3 Merge pull request #1835 from aanand/fix-crash-when-container-has-no-name
Ignore containers that don't have a name
2015-08-10 18:50:00 +01:00
Ben Firshman 197d332620 Merge pull request #1836 from aanand/use-overlay-driver-in-tests
Use overlay driver in tests
2015-08-10 18:47:29 +01:00
Aanand Prasad 7f90e9592a Use overlay driver in tests
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-10 18:05:09 +01:00
Aanand Prasad dfa4bf4452 Ignore containers that don't have a name
If a container is in the process of being removed, or removal has
failed, it can sometimes appear in the output of GET /containers/json
but not have a 'Name' key. In that case, rather than crashing, we can
ignore it.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-10 16:29:12 +01:00
Aanand Prasad 6cb8e512f2 Merge pull request #1812 from moxiegirl/install-update-for-1811
Closes #1811 for Toolbox
2015-08-10 12:48:25 +01:00
Aanand Prasad 4390362366 Test against Docker 1.8.0 RC3
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-10 12:01:51 +01:00
Mary Anthony 7c128b46a1 - Closes #1811 for Toolbox
- Updating with comments

Signed-off-by: Mary Anthony <mary@docker.com>
2015-08-09 10:51:39 -07:00
Veres Lajos 11adca9324 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
2015-08-07 22:34:24 +01:00
Mazz Mosley d1455acb64 Update docs inline with feedback
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-07 16:30:00 +01:00
Yuval Kohavi 557cbb616c ports documentation
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
2015-08-07 16:22:39 +01:00
Yuval Kohavi 0fdd977b06 fixed merge issue from previous commit
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
2015-08-07 16:22:39 +01:00
Yuval Kohavi 297941e460 rebasing port range changes
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
2015-08-07 16:22:39 +01:00
Mazz Mosley df74b131ff Use split_port for ports format check
Rather than implement the logic a second time, use docker-py
split_port function to test if the ports is valid.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-07 15:27:30 +01:00
Mazz Mosley 2e428f94ca Refactor validation out
Move validation out into its own file without causing circular
import errors.

Fix some of the tests to import from the right place.

Also fix tests that were not using valid test data, as the validation
schema is now firing telling you that you couldn't "just" have this
dict without a build/image config key.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-07 12:06:34 +01:00
Mazz Mosley 0557b5dce6 Remove dead code
These functions weren't being called by anything.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-07 12:06:34 +01:00
Mazz Mosley ea3608e1f4 Improve test coverage for validation
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-07 12:06:34 +01:00
Mazz Mosley d8aee782c8 Error handling
jsonschema provides a rich error tree of info, by parsing each error
we can pull out relevant info and re-write the error messages.

This covers current error handling behaviour.

This includes new error handling behaviour for types and formatting of
the ports field.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-07 12:06:34 +01:00
Mazz Mosley 8d6694085d Include remaining valid config properties
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-07 12:06:34 +01:00
Mazz Mosley 98c7a7da61 Order properties alphabetically
Improves readability.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-07 12:06:34 +01:00