Commit Graph

1159 Commits

Author SHA1 Message Date
df3bda7143 Merge pull request #20 from dnephin/more-lint
Add more lint checks
Upstream-commit: 9e413798bf
Component: cli
2017-05-03 20:53:30 +02:00
9b62a84ca8 Add ineffassign linter.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b86533c479
Component: cli
2017-05-02 17:57:46 -04:00
dce23b177f Add gocycle lint
Whitelist some existing offenders, and use a high limit for now.
This limit should decrese over time.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 08af0f28c5
Component: cli
2017-05-02 17:57:46 -04:00
8315ceea29 Add deadcode linter.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8f73a12f9b
Component: cli
2017-05-02 17:57:46 -04:00
8b2d591082 Add goimports to linting
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1378bf3dbe
Component: cli
2017-05-02 17:57:46 -04:00
67b6e94f47 Enable golint
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 690ef8af79
Component: cli
2017-05-02 17:57:46 -04:00
a91f6c4112 Merge pull request #18 from dnephin/add-linter
Add gometalinter to CI
Upstream-commit: 0a613971b9
Component: cli
2017-05-02 17:54:02 -04:00
93938768a0 Add gometalinter to CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e3f677794a
Component: cli
2017-05-02 17:15:56 -04:00
d9dd021654 Merge pull request #15 from gdevillele/pr-faster-build
improve speed of "go build" as well as "docker build"
Upstream-commit: 639764c00d
Component: cli
2017-04-28 13:08:39 -07:00
35669218fd Merge pull request #7 from gdevillele/pr-fix-service-ls-filter
remove service runtime filter from client
Upstream-commit: f5c8a61c9b
Component: cli
2017-04-28 10:48:25 -07:00
0882299bad Merge pull request #16 from gdevillele/pr-add-test-target
add “test” target to makefiles
Upstream-commit: 2075433f95
Component: cli
2017-04-28 10:47:51 -07:00
71e45d9207 add “test” target and make CI use it
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 4d4203f7fd
Component: cli
2017-04-27 15:57:35 -07:00
d9980d3397 remove service runtime filter from client
it’s moving to the server.

Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 5aa70d68b3
Component: cli
2017-04-27 15:07:20 -07:00
11241e3a61 make go build and docker build operations faster
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 87449dbaa1
Component: cli
2017-04-27 15:06:57 -07:00
e082a7228d Merge pull request #14 from gdevillele/pr-circle-ci
add CircleCI config file
Upstream-commit: e8d0ecdf7e
Component: cli
2017-04-27 14:58:58 -07:00
78926d2ac0 add circle ci config file
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 6b2a61a311
Component: cli
2017-04-27 14:24:28 -07:00
46ddd9d3d6 Merge pull request #10 from gdevillele/pr-ci-dockerfile
add Dockerfile for CI
Upstream-commit: 7e7df40930
Component: cli
2017-04-27 14:19:24 -07:00
93479d673b add Dockerfile for CI
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 9c3f1d9ae3
Component: cli
2017-04-27 13:36:29 -07:00
e0163aef4b Merge pull request #8 from tiborvass/fix-windows
windows: remove workaround for go#15286 and have compiling work on windows
Upstream-commit: 728060a7eb
Component: cli
2017-04-26 10:23:35 -04:00
8ef7f9b38c windows: remove workaround for go#15286 and have compiling work on windows
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 97a4da4cf1
Component: cli
2017-04-25 15:53:23 -07:00
8f4985c526 Merge pull request #3 from gdevillele/add-makefile
add Makefiles
Upstream-commit: b37ea22b1e
Component: cli
2017-04-25 09:58:40 -07:00
2c780f4003 add Makefiles and document their use in the README
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: fb413981d3
Component: cli
2017-04-25 09:57:06 -07:00
52ef86e5a9 Merge pull request #5 from gdevillele/add-gitignore
add gitignore file
Upstream-commit: 0f0b500cf3
Component: cli
2017-04-25 09:47:56 -07:00
443e26b99c Merge pull request #6 from aduermael/fix-path
fix docker/docker/cli path in comment
Upstream-commit: a01a35fb84
Component: cli
2017-04-25 09:33:17 +02:00
a99e2613c0 fix docker/docker/cli path in comment
Signed-off-by: Adrien Duermael <adrien@duermael.com>
Upstream-commit: 763802b6a3
Component: cli
2017-04-24 11:31:08 -07:00
4d8e68b211 Merge pull request #1 from dnephin/add-dockerfile
Add Dockerfile and fix vendor.conf
Upstream-commit: bbee80a62e
Component: cli
2017-04-21 13:19:54 -04:00
d6e6e95820 add gitignore file
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: acf4eab87b
Component: cli
2017-04-21 11:49:00 -05:00
c0890fae22 Add a Dockerfile for building and testing.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: b6cba06801
Component: cli
2017-04-18 19:12:24 -04:00
dd0b499677 Update vendor.conf
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 31c8672805
Component: cli
2017-04-18 18:35:14 -04:00
01b8c0f13a Add vendor
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6686ada6a4
Component: cli
2017-04-17 18:12:58 -04:00
82309a74cd Update imports.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 10641c2aae
Component: cli
2017-04-17 18:07:56 -04:00
f68763d049 Add project files
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f2559aa2e0
Component: cli
2017-04-17 17:49:33 -04:00
0890ccc8cb Import docker/docker/cmd/docker
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: cdd7bc516b
Component: cli
2017-04-17 17:44:40 -04:00
27d281716f Import docker/docker/client
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: e8a454d8a6
Component: cli
2017-04-17 17:41:20 -04:00
b2d0c4c107 Import docker/docker/cli
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 1630fc40f8
Component: cli
2017-04-17 17:40:59 -04:00
87e2086595 init
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 1302228707
Component: cli
2017-04-17 17:40:37 -04:00
545fff51d9 Fix formatter unit test (moving to testify)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e5b7b7e87b
Component: cli
2017-04-17 17:32:52 +02:00
337700e350 Merge pull request #32614 from aaronlehmann/testify
Remove pkg/testutil/assert in favor of testify
Upstream-commit: 31639e04ce
Component: cli
2017-04-17 11:07:08 -04:00
17e2d9cef6 Merge pull request #30962 from TheHipbot/30431-implement-format-for-history-with-docs
30431 implement format for history with docs
Upstream-commit: 1d73df5fc2
Component: cli
2017-04-16 10:34:41 -07:00
9c185ed98a Remove pkg/testutil/assert in favor of testify
I noticed that we're using a homegrown package for assertions. The
functions are extremely similar to testify, but with enough slight
differences to be confusing (for example, Equal takes its arguments in a
different order). We already vendor testify, and it's used in a few
places by tests.

I also found some problems with pkg/testutil/assert. For example, the
NotNil function seems to be broken. It checks the argument against
"nil", which only works for an interface. If you pass in a nil map or
slice, the equality check will fail.

In the interest of avoiding NIH, I'm proposing replacing
pkg/testutil/assert with testify. The test code looks almost the same,
but we avoid the confusion of having two similar but slightly different
assertion packages, and having to maintain our own package instead of
using a commonly-used one.

In the process, I found a few places where the tests should halt if an
assertion fails, so I've made those cases (that I noticed) use "require"
instead of "assert", and I've vendored the "require" package from
testify alongside the already-present "assert" package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 6029def4cb
Component: cli
2017-04-14 12:03:21 -07:00
ab2bc10953 Remove pkg/testutil/assert in favor of testify
I noticed that we're using a homegrown package for assertions. The
functions are extremely similar to testify, but with enough slight
differences to be confusing (for example, Equal takes its arguments in a
different order). We already vendor testify, and it's used in a few
places by tests.

I also found some problems with pkg/testutil/assert. For example, the
NotNil function seems to be broken. It checks the argument against
"nil", which only works for an interface. If you pass in a nil map or
slice, the equality check will fail.

In the interest of avoiding NIH, I'm proposing replacing
pkg/testutil/assert with testify. The test code looks almost the same,
but we avoid the confusion of having two similar but slightly different
assertion packages, and having to maintain our own package instead of
using a commonly-used one.

In the process, I found a few places where the tests should halt if an
assertion fails, so I've made those cases (that I noticed) use "require"
instead of "assert", and I've vendored the "require" package from
testify alongside the already-present "assert" package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 50e74272d1
Component: cli
2017-04-14 12:03:21 -07:00
38854e0b6a Remove pkg/testutil/assert in favor of testify
I noticed that we're using a homegrown package for assertions. The
functions are extremely similar to testify, but with enough slight
differences to be confusing (for example, Equal takes its arguments in a
different order). We already vendor testify, and it's used in a few
places by tests.

I also found some problems with pkg/testutil/assert. For example, the
NotNil function seems to be broken. It checks the argument against
"nil", which only works for an interface. If you pass in a nil map or
slice, the equality check will fail.

In the interest of avoiding NIH, I'm proposing replacing
pkg/testutil/assert with testify. The test code looks almost the same,
but we avoid the confusion of having two similar but slightly different
assertion packages, and having to maintain our own package instead of
using a commonly-used one.

In the process, I found a few places where the tests should halt if an
assertion fails, so I've made those cases (that I noticed) use "require"
instead of "assert", and I've vendored the "require" package from
testify alongside the already-present "assert" package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 7059a96e2e
Component: cli
2017-04-14 12:03:21 -07:00
f3e8b77596 Hide zero-valued timestamps from service JSON
It was possible to see output like this:

        "UpdateStatus": {
            "State": "updating",
            "StartedAt": "2017-04-14T17:10:03.226607162Z",
            "CompletedAt": "1970-01-01T00:00:00Z",
            "Message": "update in progress"
        }

The timestamp fields were already changed to pointers, and left nil if
the timestamp value was zero. However the zero-value of a timestamp from
gRPC is different from the value Go considers to be zero. gRPC uses the
Unix epoch instead of Go's epoch. Therefore, check that the timestamp
does not match the Unix epoch.

Also, add " ago" to the timestamps as shown in "docker service inspect
--pretty", as they are shown as relative times.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 5b855515e4
Component: cli
2017-04-14 10:44:24 -07:00
0c623e5079 Merge pull request #31482 from ripcurld0/add_format_to_system_df
Add format to the docker system df command
Upstream-commit: 1601dbe620
Component: cli
2017-04-13 10:08:11 -07:00
661c7e779a Merge pull request #28923 from erikh/fix-copy
Fix copy API (`docker cp`, etc) uid/gid handling
Upstream-commit: 5084e4d6b4
Component: cli
2017-04-12 08:21:17 -07:00
829a4940fd Merge pull request #28923 from erikh/fix-copy
Fix copy API (`docker cp`, etc) uid/gid handling
Upstream-commit: 384e8e39e1
Component: cli
2017-04-12 08:21:17 -07:00
1a43543a80 daemon/archive.go: Fix copy routines to preserve UID.
This changes the long-standing bug of copy operations not preserving the
UID/GID information after the files arrive to the container.

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
Upstream-commit: f77e2d15d7
Component: cli
2017-04-12 10:33:19 +00:00
d224015064 daemon/archive.go: Fix copy routines to preserve UID.
This changes the long-standing bug of copy operations not preserving the
UID/GID information after the files arrive to the container.

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
Upstream-commit: 7a767a1a7e
Component: cli
2017-04-12 10:33:19 +00:00
609a6284d4 Merge pull request #32030 from ehazlett/any-runtime
Support Swarmkit Generic Task Runtime
Upstream-commit: abaaa82400
Component: cli
2017-04-11 17:53:20 -07:00
a95c38ad30 client: Allow hex strings as source references for ImageTag
The source of a tag operation is allowed to be a 64-character hex
string. This means it should use ParseAnyReference for validation
instead of ParseNormalizedNamed.

This fixes a regression that happened in 17.04.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d857c869d2
Component: cli
2017-04-11 13:37:04 -07:00