Commit Graph

2827 Commits

Author SHA1 Message Date
Nicolas De loof b9f38feb25
Merge pull request #1935 from shua/scale0 2021-07-26 08:23:50 +02:00
Nicolas De loof 3d83989f5d
Merge pull request #1773 from ulyssessouza/completion 2021-07-26 08:23:13 +02:00
Nicolas De loof 1b76c746fe
Merge pull request #1934 from ndeloof/control_char_run 2021-07-26 08:22:57 +02:00
Nicolas De loof de6bdd4313
Merge pull request #1943 from amineck/pat_msg 2021-07-23 17:50:47 +02:00
JD Lloret c82dd55fd2
allow for 0 scale/replicas
Signed-off-by: JD Lloret <jd.lloret@joyent.com>
2021-07-23 11:38:20 -04:00
Amine Chouki 5c427ef702 Move pat_suggest.go into `cli` package
Signed-off-by: Amine Chouki <amine.chouki@docker.com>
2021-07-23 10:55:31 -04:00
Nicolas De Loof 86eadc7d67
reduce complexity (linter)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-23 15:20:53 +02:00
Nicolas De Loof 0b72b502d3
close container stream on os.stdin EOF
close https://github.com/docker/compose-cli/issues/1944

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-23 14:53:26 +02:00
Nicolas De Loof c257001e5a
Restore support for control sequence in `compose run`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-23 13:58:58 +02:00
Nicolas De loof d993c47db6
Merge pull request #1937 from milas/cli-service-order
Print services in dependency order
2021-07-23 10:01:41 +02:00
Amine Chouki e16d0b48dd use github.com/hashicorp/go-uuid
Signed-off-by: Amine Chouki <amine.chouki@docker.com>
2021-07-22 16:58:00 -04:00
Amine Chouki 906e1b4305 Add a post-login message to promote personal access tokens
Signed-off-by: Amine Chouki <amine.chouki@docker.com>
2021-07-22 16:58:00 -04:00
Nicolas De Loof afc9cf8018
update compose-go
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-22 17:22:51 +02:00
Milas Bowman 1e35245390 Print services in dependency order
Currently, `compose config --services` outputs the services in
a random/non-deterministic order.

In Compose v1, this was implicitly topologically sorted because
the project services were pre-sorted. With `compose-go`, the
services are unordered, and the `WithServices()` helper can be
used to iterate in dependency order.

Signed-off-by: Milas Bowman <milasb@gmail.com>
2021-07-21 11:11:38 -04:00
Nicolas De loof 54dc6f9374
Merge pull request #1926 from ulyssessouza/fix-dotEnv-load-precedence
Fix dotEnv load path precedence by compose-go bump
2021-07-19 15:56:39 +02:00
Nicolas De loof 66fa1657f5
Merge pull request #1890 from lorenrh/il-222-release
Add dry run workflow to test release
2021-07-19 15:56:17 +02:00
Ulysses Souza 43c4db439e Fix dotEnv load path precedence by compose-go bump
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-16 11:03:14 -03:00
Ulysses Souza c28aec2308 Filter completions by toComplete variable
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 14:33:37 -03:00
Ulysses Souza 72b66fb5c1 Add 'no completion' or 'service' completion
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 14:33:37 -03:00
Ulysses Souza 37961c51ca Add completion to "compose ps"
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 14:33:37 -03:00
Ulysses Souza 3174f49dc2 Add completion to shells
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 14:33:37 -03:00
Nicolas De loof 7a4e111794
Merge pull request #1852 from ulyssessouza/logs-follow-scale 2021-07-12 17:23:37 +02:00
Nicolas De loof ba4a74267d
Merge pull request #1913 from ndeloof/nothing_to_start 2021-07-12 17:21:20 +02:00
Lorena Rangel 8fd04195be
Merge pull request #1914 from ndeloof/run_volumes
run -v should not remove configured volumes
2021-07-12 16:02:21 +02:00
Ulysses Souza 287f3156ae Detect new containers on logs --follow
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 09:02:51 -03:00
Nicolas De Loof e6f7c64eb8
run -v should not remove configured volumes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-12 12:40:37 +02:00
Nicolas De Loof 0a5b43d1e3
report error when there's no container to start
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-12 12:10:50 +02:00
Nicolas De loof 2e99f805e1
Merge pull request #1912 from ndeloof/ps_services 2021-07-12 10:51:17 +02:00
Nicolas De Loof bf0b75cee0
report error on `ps` when no container found for service(s)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-12 10:42:31 +02:00
Mathieu Champlon 396d449d36
Merge pull request #1906 from mikesir87/fix-log-names
Fix container name used in kube log output
2021-07-09 08:08:50 +02:00
Mathieu Champlon a8fc2149b3
Merge pull request #1904 from ulyssessouza/bump-compose-go-volumes-lowcase
Bump compose-go
2021-07-09 08:01:53 +02:00
Michael Irwin 8c5b970376
Fix container name used in kube log output
Signed-off-by: Michael Irwin <mikesir87@gmail.com>
2021-07-08 22:04:01 -04:00
Ulysses Souza f4947b68e5 Bump compose-go
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-08 18:37:25 -03:00
Ulysses Souza ed0b123b75
Merge pull request #1901 from mat007/fix-races
Fix races
2021-07-07 11:11:11 -03:00
Mathieu Champlon 2d0d3881ac Fix slice access
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-07-07 12:57:13 +02:00
Mathieu Champlon 9317ffc0ab Serialize access to observed state
This should fix concurrent accesses to the map.

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-07-07 12:25:32 +02:00
Mathieu Champlon 918fe00f3e Fix loop variable captures in goroutines
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-07-07 12:25:22 +02:00
Mathieu Champlon 9d031553f3
Merge pull request #1897 from mikesir87/update-context-help-for-k8s
Fix help text when for context create and kube backend
2021-07-07 07:52:59 +02:00
Michael Irwin 08c2c44beb
Fix help text when for context create and kube backend
Signed-off-by: Michael Irwin <mikesir87@gmail.com>
2021-07-06 15:46:00 -04:00
Lorena Rangel edcb23b11f Add dry run workflow to test release
Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
2021-07-05 10:07:37 +02:00
Mathieu Champlon 1da8be257b
Merge pull request #1884 from thaJeztah/dont_trim_version_prefix
Do not strip "v" prefix from version when printing
2021-07-03 16:15:53 +02:00
Sebastiaan van Stijn a0db32043e
Do not strip "v" prefix from version when printing
I noticed this when building the binary; `internal.Version` is set to `v2.0.0-beta.4`,
to match the tag.

```bash
GIT_TAG=v2.0.0-beta.4
make COMPOSE_BINARY=bin/docker-compose -f builder.Makefile compose-plugin \
    GOOS=linux \
    GOARCH=amd64 \
    CGO_ENABLED=0 \
    go build \
        -trimpath \
        -ldflags="-s -w -X github.com/docker/compose-cli/internal.Version=v2.0.0-beta.4" \
        -o bin/docker-compose \
        ./cmd
```

However, the binary has the `v` prefix stripped (which caused a check to fail
when packaging):

```bash
/root/rpmbuild/BUILDROOT/docker-compose-plugin-2.0.0.beta.4-0.fc34.x86_64/usr/libexec/docker/cli-plugins/docker-compose docker-cli-plugin-metadata
++ awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }'
+ ver=2.0.0-beta.4
+ test 2.0.0-beta.4 = v2.0.0-beta.4
FAIL: docker-compose version (2.0.0-beta.4) did not match
```

This also looks inconsistent with other binaries and plugins we ship:

```bash
docker info --format '{{json .ClientInfo.Plugins}}' | jq .
[
  {
    "SchemaVersion": "0.1.0",
    "Vendor": "Docker Inc.",
    "Version": "v0.5.1-docker",
    "ShortDescription": "Build with BuildKit",
    "Name": "buildx",
    "Path": "/usr/libexec/docker/cli-plugins/docker-buildx"
  },
  {
    "SchemaVersion": "0.1.0",
    "Vendor": "Docker Inc.",
    "Version": "2.0.0-beta.4",
    "ShortDescription": "Docker Compose",
    "Name": "compose",
    "Path": "/usr/libexec/docker/cli-plugins/docker-compose"
  },
  {
    "SchemaVersion": "0.1.0",
    "Vendor": "Docker Inc.",
    "Version": "v0.8.0",
    "ShortDescription": "Docker Scan",
    "Name": "scan",
    "Path": "/usr/libexec/docker/cli-plugins/docker-scan"
  }
]
```

Perhaps there was a specific reason for this, but thought I'd open this PR for
discussion (if the v-prefix should not be there, perhaps we should isntead strip
it when setting the version).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-03 15:53:21 +02:00
Mathieu Champlon 8d2ea5feb1
Merge pull request #1880 from ndeloof/stdin_eof
close sdtin stream on EOF to propagate exec process' stdin
2021-07-03 13:39:11 +02:00
Nicolas De Loof bee156fb97
close sdtin stream on EOF to propagate exec process' stdin
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-02 17:02:20 +02:00
Nicolas De Loof 41d5eb45b1
update compose-go
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-02 15:02:41 +02:00
Nicolas De Loof fc087a9e1d update compose-go
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-02 13:34:27 +02:00
Nicolas De loof 4049feb74d
Merge pull request #1878 from ndeloof/exec_streams 2021-07-02 11:05:06 +02:00
Nicolas De Loof 96e1e041d6
distinguish stdout and stderr
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-02 10:53:11 +02:00
Mathieu Champlon 5ea2b20341
Merge pull request #1877 from rfay/patch-2
Issue template should ask for docker-compose version
2021-07-02 07:58:54 +02:00
Randy Fay 1635451ac9 Issue template should ask for docker-compose version
Signed-off-by: Randy Fay <randy@randyfay.com>
2021-07-01 23:38:20 -06:00