Commit Graph

432 Commits

Author SHA1 Message Date
Guillaume Tardif e7682682fb Store context type in metadata to make retrocompatibility with previous contexts easier (potentially switching back and forth) 2020-06-10 18:17:48 +02:00
Guillaume Tardif 72bae873c5 Do not delegate to old cli if cobra fails before invoking the PreRun or SetHelp hook that call isOwnCommand(). Find the command from root.Find(args).
Tried to use  `cmd, err := root.ExecuteC()` but I can’t pass the context like with `root.ExecuteContext(ctx)`, could not find a way without and explicit call to root.Find(args)
2020-06-10 17:25:52 +02:00
Djordje Lukic 8930563a25
Merge pull request #194 from docker/dependabot/go_modules/github.com/onsi/gomega-1.10.1
Bump github.com/onsi/gomega from 1.9.0 to 1.10.1
2020-06-10 02:12:45 -07:00
dependabot-preview[bot] fa5b3b2291
Bump github.com/onsi/gomega from 1.9.0 to 1.10.1
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.9.0 to 1.10.1.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.9.0...v1.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-10 09:07:30 +00:00
Djordje Lukic 956237430d
Merge pull request #199 from docker/fix_login_error
Fix login error when login to an azure account having no associated tenant.
2020-06-10 02:04:35 -07:00
Djordje Lukic f236c5fa45
Merge pull request #193 from docker/dependabot/go_modules/github.com/Azure/go-autorest/autorest/adal-0.8.3
Bump github.com/Azure/go-autorest/autorest/adal from 0.8.2 to 0.8.3
2020-06-10 02:03:45 -07:00
Djordje Lukic 1639834429
Merge pull request #196 from rumpl/feat-store-grpc-context
Add the store to the gRPC context
2020-06-10 02:03:32 -07:00
Guillaume Tardif 819a7389f7 Fix login error when login to an azure account having no associated tenant.
This was encountered by @lorenrh with stack : 
```
docker login azure
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/docker/api/azure/login.AzureLoginService.Login(0xc0004cc2a0, 0x2d, 0xe8b8a0, 0x1476830, 0xe8e4e0, 0xc000498ff0, 0x0, 0x0)
        github.com/docker/api/azure/login/login.go:130 +0x1057
github.com/docker/api/azure.(*aciCloudService).Login(0xc0004888c0, 0xe8e4e0, 0xc000498ff0, 0x0, 0xe82720, 0xc0004888c0)
        github.com/docker/api/azure/backend.go:283 +0x64
github.com/docker/api/cli/cmd/login.cloudLogin(0xc0004eb600, 0xd422a4, 0x3, 0x1, 0xffffffffffffffff)
        github.com/docker/api/cli/cmd/login/login.go:53 +0xae
github.com/docker/api/cli/cmd/login.runLogin(0xc0004eb600, 0xc00049c5f0, 0x1, 0x1, 0x0, 0x0)
        github.com/docker/api/cli/cmd/login/login.go:39 +0x15e
github.com/spf13/cobra.(*Command).execute(0xc0004eb600, 0xc00049c5d0, 0x1, 0x1, 0xc0004eb600, 0xc00049c5d0)
        github.com/spf13/cobra@v1.0.0/command.go:842 +0x45a
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004a8580, 0xc000498fc0, 0xc41160, 0x1476830)
        github.com/spf13/cobra@v1.0.0/command.go:950 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.0.0/command.go:887
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        github.com/spf13/cobra@v1.0.0/command.go:880
main.main()
        github.com/docker/api/cli/main.go:167 +0x68f
```
2020-06-10 10:15:03 +02:00
Djordje Lukic 8400795caf Add the store to the gRPC context
The contexts service needs it
2020-06-09 12:11:59 +02:00
dependabot-preview[bot] 4b9bdd0e4b
Bump github.com/Azure/go-autorest/autorest/adal from 0.8.2 to 0.8.3
Bumps [github.com/Azure/go-autorest/autorest/adal](https://github.com/Azure/go-autorest) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/Azure/go-autorest/releases)
- [Changelog](https://github.com/Azure/go-autorest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Azure/go-autorest/compare/autorest/adal/v0.8.2...autorest/adal/v0.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-09 07:59:55 +00:00
Chris Crone a47a2d39c3
Merge pull request #195 from docker/chore-dependabot-daily
Run dependabot daily instead of weekly
2020-06-09 09:58:49 +02:00
Djordje Lukic 43a607a4af
Merge pull request #192 from docker/dependabot/go_modules/github.com/stretchr/testify-1.6.1
Bump github.com/stretchr/testify from 1.5.1 to 1.6.1
2020-06-09 00:55:18 -07:00
Djordje Lukic 9c21e09044 Run dependabot daily instead of weekly
Hopefully we will have less PRs at the same time if it looks daily.
2020-06-09 09:45:57 +02:00
dependabot-preview[bot] 63bdcad79e
Bump github.com/stretchr/testify from 1.5.1 to 1.6.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.5.1 to 1.6.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.5.1...v1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-08 21:26:19 +00:00
Djordje Lukic 574a378886
Merge pull request #182 from rumpl/feat-context-server
Feat context server
2020-06-08 07:47:35 -07:00
Djordje Lukic c8079d61ee Move streams into own package 2020-06-08 16:01:53 +02:00
Djordje Lukic bb69de1db3 Add context endpoint to set the current context 2020-06-08 16:01:43 +02:00
Djordje Lukic 22d4d250a9 Move the config into own package and outside of cli 2020-06-08 16:01:36 +02:00
Djordje Lukic 67fb49c98c
Merge pull request #179 from rumpl/feat-stream
Feat stream
2020-06-08 06:52:56 -07:00
Guillaume Tardif 660e61ad6d
Merge pull request #169 from docker/container_id_display
Do not truncate ACI container IDs
2020-06-08 13:50:04 +02:00
Guillaume Tardif f1a5f2d6cf Backend is responsible for generating containers IDs and truncate them if wanted/supported for docker ps 2020-06-08 12:37:33 +02:00
Djordje Lukic 71087c68be Add exec.ts for an example of exec over gRPC 2020-06-08 09:46:27 +02:00
Djordje Lukic c34d016fdb Unify protos with client interfaces
* change function names in containers.proto
* add streams proto
2020-06-08 09:43:19 +02:00
Djordje Lukic e604e7efc9
Merge pull request #181 from rumpl/fix-logs
Use stdcopy if the container doesn't have a tty
2020-06-08 00:34:05 -07:00
Guillaume Tardif 4700364667
Merge pull request #180 from docker/unknown_comand_error
Display friendly message if unknown command is available in default context
2020-06-08 09:25:18 +02:00
Djordje Lukic 31a0716c87 Use stdcopy if the container doesn't have a tty 2020-06-08 08:46:30 +02:00
Djordje Lukic e81c7ae8e3
Merge pull request #185 from docker/dependabot/go_modules/github.com/Azure/azure-sdk-for-go-42.3.0incompatible
Bump github.com/Azure/azure-sdk-for-go from 42.0.0+incompatible to 42.3.0+incompatible
2020-06-06 15:13:44 -07:00
dependabot-preview[bot] b6f8d9cd80
Bump github.com/Azure/azure-sdk-for-go
Bumps [github.com/Azure/azure-sdk-for-go](https://github.com/Azure/azure-sdk-for-go) from 42.0.0+incompatible to 42.3.0+incompatible.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/v42.0.0...v42.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-06 21:49:23 +00:00
Djordje Lukic 4cc89f577d
Merge pull request #183 from docker/dependabot/go_modules/google.golang.org/protobuf-1.24.0
Bump google.golang.org/protobuf from 1.22.0 to 1.24.0
2020-06-06 14:44:22 -07:00
dependabot-preview[bot] 5951db58c1
Bump google.golang.org/protobuf from 1.22.0 to 1.24.0
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.22.0 to 1.24.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.22.0...v1.24.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-06 21:41:25 +00:00
Djordje Lukic bd198c741e
Merge pull request #186 from docker/dependabot/go_modules/github.com/golang/protobuf-1.4.2
Bump github.com/golang/protobuf from 1.4.1 to 1.4.2
2020-06-06 14:38:02 -07:00
Djordje Lukic c57cc28f29
Merge pull request #187 from docker/dependabot/go_modules/github.com/opencontainers/go-digest-1.0.0
Bump github.com/opencontainers/go-digest from 1.0.0-rc1 to 1.0.0
2020-06-06 14:37:49 -07:00
Djordje Lukic a1d3ba398a
Merge pull request #184 from docker/dependabot/go_modules/github.com/Azure/go-autorest/autorest-0.10.2
Bump github.com/Azure/go-autorest/autorest from 0.10.0 to 0.10.2
2020-06-06 14:37:34 -07:00
dependabot-preview[bot] 5bb15bbf58
Bump github.com/opencontainers/go-digest from 1.0.0-rc1 to 1.0.0
Bumps [github.com/opencontainers/go-digest](https://github.com/opencontainers/go-digest) from 1.0.0-rc1 to 1.0.0.
- [Release notes](https://github.com/opencontainers/go-digest/releases)
- [Commits](https://github.com/opencontainers/go-digest/compare/v1.0.0-rc1...v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-06 21:23:14 +00:00
dependabot-preview[bot] cd711e5f6b
Bump github.com/golang/protobuf from 1.4.1 to 1.4.2
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.4.1...v1.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-06 21:22:53 +00:00
dependabot-preview[bot] 3774557392
Bump github.com/Azure/go-autorest/autorest from 0.10.0 to 0.10.2
Bumps [github.com/Azure/go-autorest/autorest](https://github.com/Azure/go-autorest) from 0.10.0 to 0.10.2.
- [Release notes](https://github.com/Azure/go-autorest/releases)
- [Changelog](https://github.com/Azure/go-autorest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Azure/go-autorest/compare/autorest/v0.10.0...autorest/v0.10.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-06 21:21:36 +00:00
Guillaume Tardif f939dd4d47 Display friendly message if unknown command is available in default context 2020-06-05 18:24:08 +02:00
Guillaume Tardif 54141a9bdd Do not display exit status when classic cli exit in error 2020-06-05 18:17:18 +02:00
Djordje Lukic e84b508e80
Merge pull request #171 from docker/windows_kill_child_processes
Windows : kill child processes
2020-06-05 00:42:21 -07:00
guillaume.tardif 995d047608 Windows specific : ensure all child processes are killed when parent exits (also works when killing parent). From Desktop code 2020-06-04 17:58:24 +02:00
guillaume.tardif 7c6b04f28e make e2e TestKillChildOnCancel exec properly on windows 2020-06-04 17:58:24 +02:00
Guillaume Tardif b91eab0544
Merge pull request #170 from docker/context_create_check
Do not allow context creation for unknown types
2020-06-04 16:51:11 +02:00
Guillaume Tardif 4a4b62ded2 Do not allow context creation for unknown types 2020-06-04 16:44:08 +02:00
Guillaume Tardif e77513c1c8
Merge pull request #165 from docker/azure_private_images
Allow pulling private images from hub or other registries
2020-06-04 15:43:42 +02:00
Guillaume Tardif 427527d197
Merge pull request #146 from docker/chore-refactor-azure-login
Refactor Azure login local server
2020-06-04 10:39:30 +02:00
Christopher Crone e5335adedd Azure: Refactor login errors
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-06-04 10:20:39 +02:00
Guillaume Tardif c37f666c07
Merge pull request #164 from docker/interactive_context_create
Interactive context create
2020-06-03 18:06:41 +02:00
Christopher Crone 35789ace12 Azure: Refactor creation of login server
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-06-03 17:10:54 +02:00
Djordje Lukic dae54a3c1f
Merge pull request #166 from docker/grpc_container_errfix
Fix slight bug in error handling
2020-06-03 04:12:47 -07:00
Guillaume Tardif 1c94893d2f Fix slight bug in error handling 2020-06-03 12:20:49 +02:00