1
0
mirror of https://github.com/docker/compose-cli.git synced 2026-10-23 18:09:06 +03:00

3046 Commits

Author SHA1 Message Date
Guillaume Lours
6b231d670b Merge pull request #2252 from eunomie/docker-scout-cli-hints
feat: display docker scout hints on build and pull
v1.0.35
2023-06-21 11:32:41 +02:00
Yves Brissaud
eb0c44c6ef chore: handle BUILDKIT_PROGRESS to disable hints
the same way we check --progress flag, if it exists, disable

Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
2023-06-15 15:59:58 +02:00
Yves Brissaud
9a3433477b chore: fix header dates
Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
2023-06-15 15:16:28 +02:00
Yves Brissaud
8371dab4ae ref: use plugins part of config file
To avoid any conflict with the CLI, use the `plugins` section of the
config. This section is read and saved by the CLI without the risk to
remove the value in there. So it's a safe way to deal with this feature.

As it's a cross plugin configuration (now for scout but goal is wider
than that) then put it under a generic `-x-cli-hints` name so that other
plugins might use it if needed.

Value can be true/false, but is parsed against these exact two values
instead of using the ParseBool.

Both the environment variable and the config value are parsed the same
way.

Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
2023-06-13 10:19:22 +02:00
Yves Brissaud
fac770ab1d fix: ignore short flags too when finding pulled image
Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
2023-06-12 15:41:29 +02:00
Yves Brissaud
1ceb12ae77 chore: manage CLI Hints enable/disable behaviour
- cliHints entry in config.json
- if not present, enabled by default
- can be overridden by the DOCKER_CLI_HINTS environment variable

Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
2023-06-12 14:39:50 +02:00
Yves Brissaud
90058ec005 ref: suggest management and check needed flags
only display the hints in main case, without progress, output or push
flags

Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
2023-06-12 10:20:37 +02:00
Yves Brissaud
62c2e00acc ref: get pulled image
Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
2023-06-06 18:32:14 +02:00
Yves Brissaud
635db3c338 feat: display docker scout hints on build and pull
On `docker build` and `docker pull` commands, display a hint to
`docker scout quickview`.
Hints are disabled if quiet flag is used or if `DOCKER_SCOUT_HINTS`
environment variable is set to a false (according to Go) value:
  `0`, `f`, `F`, `false`, `FALSE`, `False`

In case of a `docker build` the `docker scout quickview` command doesn't
need an argument as it will take the most recently built image by
default.
In case of a `docker pull` the pulled image is extracted from the
command arguments.

Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
2023-06-06 11:38:55 +02:00
Guillaume Lours
a0eabb3bb3 Merge pull request #2249 from milas/adjust-compose-events
metrics: adjust Compose event collection
v1.0.34
2023-06-02 13:18:20 +02:00
Guillaume Lours
e099b83d5c Merge pull request #2250 from paco-valverde/scout_subcommands
feat: added additional subcommands
2023-06-02 12:45:37 +02:00
pvalverde
61d6b02465 feat: added additional subcommands
Signed-off-by: pvalverde <91528455+paco-valverde@users.noreply.github.com>
2023-06-02 12:30:50 +02:00
Milas Bowman
b821810726 metrics: adjust Compose event collection
* for per-invocation events, only look at Compose `alpha`
  commands

* for aggregated events, include Compose `alpha` commands

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-06-01 16:36:03 -04:00
Milas Bowman
b92b78a993 Merge pull request #2246 from milas/docs-deprecation
docs: add deprecation notice
v1.0.33
2023-05-18 12:43:55 -04:00
Milas Bowman
d2fdb2011c Merge pull request #2247 from milas/cloud-eol-envvar
cli: allow suppressing deprecation warning
2023-05-18 12:00:22 -04:00
Milas Bowman
5593ef3034 cli: allow suppressing deprecation warning
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-05-18 11:49:58 -04:00
Milas Bowman
9b21f9af16 Merge pull request #2245 from ndeloof/deprecation_notice
cli: deprecation notice
2023-05-18 11:32:49 -04:00
Milas Bowman
34397cc5b0 docs: add deprecation notice
These are pulled into the `docs.docker.com` site.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-05-18 10:36:08 -04:00
Milas Bowman
92edf30ce8 deprecation: text revisions
Co-authored-by: Han Yu <han@sent.com>
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-05-18 10:33:26 -04:00
Nicolas De Loof
53da0fed35 deprecation notice
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-05-16 15:51:50 +02:00
Guillaume Lours
9ef8facb00 Merge pull request #2240 from paco-valverde/scout-command-metrics
metrics: scout command usage
v1.0.32
2023-04-13 17:12:02 +02:00
pvalverde
97551730c0 feat: scout command metrics
Signed-off-by: pvalverde <91528455+paco-valverde@users.noreply.github.com>
2023-04-11 20:07:09 +02:00
Milas Bowman
731d87bbc1 Merge pull request #2226 from milas/metrics-event-reporter
metrics: track and report non-aggregated events
v1.0.31
2023-02-09 08:47:24 -05:00
Milas Bowman
784377898f metrics: track and report non-aggregated events
Currently, "usage" reports are sent, which are aggregated.
Add "event" variant, which won't be aggregated.

For compatibility, the "usage" events remain and nothing has
changed in terms of how they parse the command args, for example.
This will ensure continued functioning of anything that relies
on these metrics.

For the "event" variants, the CLI parsing is slightly different
in an attempt to improve data analysis capabilities while still
being respectful of user privacy (i.e. only known values of Docker
CLI commands/flags are ever recorded). Additionally, execution
duration information is now reported with these events.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-08 14:17:04 -05:00
Milas Bowman
ce03114944 Merge pull request #2225 from milas/metrics-duration
metrics: initial logic for command execution duration
2023-02-08 09:19:09 -05:00
Milas Bowman
98291e0f82 Merge pull request #2223 from milas/metrics-compose-helper
metrics: move helper code from Compose
2023-02-08 09:18:53 -05:00
Milas Bowman
e7d8d05d99 metrics: initial logic for command execution duration
Add a timer around command invocations to be reported with metrics.
This isn't actually sent anywhere currently, as it's meant for
evented data which is forthcoming. (We could report it with the
current events, but it's not clear that there's any value in doing
so.)

The signature for `Track()` has been changed to take an object with
all the fields. This is both for sanity to keep the method from
getting ridiculously long, and to make it easier to unify the usage
(heartbeat) and event code paths by ensuring we have all the data
for both.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-06 17:08:27 -05:00
Milas Bowman
16482c0611 metrics: move helper code from Compose
Compose doesn't actually currently use this code, it's only used
here. Moving it inline so that we can drop it from Compose in the
future or make changes as needed without worrying about this as a
dependency.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-06 16:50:29 -05:00
Milas Bowman
2974b2a1a0 Merge pull request #2219 from milas/metrics-recorder
metrics: add debug implementation
2023-02-06 10:22:01 -05:00
Milas Bowman
3f6822e196 metrics: add debug implementation
Refactor the metrics client slightly to add the concept of a
"reporter" that actually sends the metrics.

The primary implementation is HTTP-based as before, but a key
difference now is that there's another variant that writes to
a file for simplified debugging. This is activated by setting
the `DOCKER_METRICS_DEBUG_LOG` environment variable to a file
path to write events to as JSON lines.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-02 09:20:32 -05:00
Milas Bowman
95d9fbd3b1 Merge pull request #2220 from milas/go-1.19
build: upgrade to Go 1.19 & build tweaks
2023-02-02 09:15:09 -05:00
Milas Bowman
90324a5623 test: update golden files
Newline differences

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-01 16:04:49 -05:00
Milas Bowman
7b33d015a3 ci: update golangci-lint version
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-01 16:04:49 -05:00
Milas Bowman
020489241f lint: update for Go 1.19 / golangci-lint 1.50.1
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-01 16:04:49 -05:00
Milas Bowman
e821c36bcc build: upgrade to Go 1.19 & build tweaks
* Use Go 1.19 and latest golangci-lint
* Bump support libraries (i.e. everything that does not
  touch cloud / Compose)
* Dockerfile caching/performance improvements

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-01 16:04:49 -05:00
Guillaume Tardif
7a57a330f6 Merge pull request #2216 from gtardif/extension_share_command
Add share command (docker extension share) in metrics whitelist
v1.0.30
2023-01-20 15:26:19 +01:00
Guillaume Tardif
4b1cbd08aa Add share command (docker extension share) in metrics whitelist
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2023-01-19 17:51:10 +01:00
Guillaume Lours
79770d5803 Merge pull request #2204 from thaJeztah/cleanup_output
cli/mobycli: Exec(): simplify output
2022-12-06 22:50:30 +01:00
Sebastiaan van Stijn
f1aa070b81 cli/mobycli: Exec(): simplify output
The command now was showing 2 informational messages (about PAT and
Scan); the scan one had been there for a while so most users will
know about it by now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-06 21:48:43 +01:00
Stefan Scherer
d7becb4ee1 Merge pull request #2185 from backplane/fixes-2154
docs: applies wording suggested in #2154
2022-10-28 09:34:34 +02:00
Mathieu Champlon
1395a3fd7c Merge pull request #2191 from nicks/nicks/use
cli: fix warnings on 'docker context use'
2022-10-19 20:43:41 +02:00
Nick Sieger
69558b205d Merge pull request #2195 from mtelvers/build-arm64
Added Linux/ARM64 to ECS sidecar builds fixes #2190 and #2115
2022-10-11 16:11:08 -04:00
Mark Elvers
b6cd5740e7 Added Linux/AMD64 to ECS sidecar builds
Signed-off-by: Mark Elvers <mark.elvers@tunbury.org>
2022-09-23 10:58:42 +00:00
Nick Santos
bb0197e198 cli: fix warnings on 'docker context use'. Fixes https://github.com/docker/cli/issues/3765
Signed-off-by: Nick Santos <nick.santos@docker.com>
2022-09-14 18:17:32 -04:00
actualben
ed3a7b7fe7 docs: applies wording suggested in #2154
Signed-off-by: actualben <actualben@users.noreply.github.com>
2022-08-24 14:35:08 +02:00
Nick Sieger
6135c5edf1 Merge pull request #2151 from crazy-max/build-metrics-futureproof
build metrics compatibility for next 22.06
v1.0.29
2022-07-27 12:01:04 -05:00
Nick Sieger
4dc3e196a4 Merge pull request #2179 from nicksieger/fix-windows-missing-existing-cli
Fix Windows e2e-local test
2022-07-27 10:05:23 -05:00
CrazyMax
668b262605 build metrics compatibility for next 22.06
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-27 17:03:03 +02:00
Nick Sieger
a451eba005 e2e-local: use platform-dependent name for com.docker.cli
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-07-27 09:48:25 -05:00
Nick Sieger
bf1fd67911 Merge pull request #2176 from thaJeztah/gofmt_119
gofmt files with go 1.19
2022-07-27 09:18:21 -05:00