Граф коммитов

3025 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] e7b33e11ac
build(deps): bump github.com/containerd/containerd from 1.5.17 to 1.5.18
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.5.17 to 1.5.18.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.5.17...v1.5.18)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-16 14:38:35 +00:00
Milas Bowman 731d87bbc1
Merge pull request #2226 from milas/metrics-event-reporter
metrics: track and report non-aggregated events
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
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
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
Nick Sieger 7e355b8a77
Merge pull request #2178 from nicksieger/cli-binary-path-handling
cli binary path handling
2022-07-27 09:18:10 -05:00
Nick Sieger 4678a3e780
mobycli: add test for comDockerCli
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-07-27 09:07:27 -05:00
Nick Sieger 22d68602ae
mobycli: append .exe to com.docker.cli on windows
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-07-27 09:00:11 -05:00
Nick Sieger fc215287b5
mobycli: update approach for finding cli command to use
1. Use path from env variable `$DOCKER_COM_DOCKER_CLI`
2. Use path formed from parent directory of current process joined with
   `com.docker.cli`
3. Look for `com.docker.cli` on $PATH

Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-07-26 15:12:11 -05:00
Nick Sieger d8b9310e03
Merge commit '48c999679165e8f0355f32092063ab4f0ceeee42' of https://github.com/crazy-max/compose-cli into cli-binary-path-handling
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-07-26 14:54:13 -05:00
Guillaume Lours 77e61c2f92
Merge pull request #2177 from p1-0tr/ps-global-cli-sock-fallback
Fall back to global CLI socket on Linux
2022-07-25 15:48:53 +02:00
Piotr Stankiewicz cfa212f15d Fall back to global CLI socket on Linux
DD relies on having the CLI socket available in /var/run when running in
WSL. So in case we can't find the CLI socket in the calling user's home
directory, fall back to /var/run.

Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
2022-07-25 15:33:00 +02:00
Guillaume Lours 2d878f7f4b
Merge pull request #2175 from glours/update-gotest-go-1.18
update gotest.tools to v3.3.0 which support golang 1.18
2022-07-25 12:55:30 +02:00
Sebastiaan van Stijn fb71f3bc8a
gofmt files with go 1.19
Prepare for future updates of Go, which may result in some changes in
formatting in GoDoc comments.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-25 12:31:30 +02:00
Guillaume Lours 1a01d2f198
update gotest.tools to v3.3.0 which support golang 1.18
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-25 12:20:42 +02:00
Guillaume Lours 8839c52fea
Merge pull request #2174 from crazy-max/go-1.18
Go 1.18
2022-07-25 10:27:33 +02:00
CrazyMax 5780bc5656
ci: use cache feature from actions/setup-go
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-24 00:49:09 +02:00
CrazyMax 1dce98712a
Go 1.18
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-24 00:49:08 +02:00
Guillaume Lours 0978185f3c
Merge pull request #2163 from docker/dependabot/go_modules/github.com/containerd/containerd-1.5.13
Bump github.com/containerd/containerd from 1.5.10 to 1.5.13
2022-07-22 22:43:21 +02:00
Guillaume Lours 471888f366
Merge pull request #2171 from p1-0tr/ps-docker-cli-sock-from-home
Use Docker CLI socket from home
2022-07-22 17:23:33 +02:00
Piotr Stankiewicz 19ac0adf62 Switch to using addlicense for copyright header validation
Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
2022-07-22 11:31:25 +02:00
Piotr Stankiewicz f922ff963d Use Docker CLI socket from the User's home directory
We should not rely on having a global path for the Docker CLI socket. On
macOS this forces Docker Desktop to access directories which require
raised privileges. Whereas on Linux we do not create sockets in that
location at all, currently. So look for the Docker CLI socket in the
User's home directory.

Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
2022-07-22 11:31:22 +02:00
dependabot[bot] 059ae18bf1
Bump github.com/containerd/containerd from 1.5.10 to 1.5.13
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.5.10 to 1.5.13.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.5.10...v1.5.13)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 22:13:28 +00:00
CrazyMax 48c9996791
Allow to override classic cli binary via env var
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-31 07:25:16 +02:00
Guillaume Lours 6f3f942e1f
Merge pull request #2157 from nahuel-soldevilla/2152-fix-typo
Fix typo: change "cpu" to "cpus" in resources
2022-05-30 15:25:57 +02:00
Nahuel Soldevilla 128dae0d82
Fix typo: change "cpu" to "cpus" in resources
Signed-off-by: Nahuel Soldevilla <nahuel@leafnode.io>
2022-05-27 11:50:17 -03:00