Commit Graph

433 Commits (54302c477b6328e0f823768599f149641350dbe0)

Author SHA1 Message Date
Tõnis Tiigi dc397eae4a
Merge pull request #2238 from tonistiigi/http-tracing
tracing: update to otelhttp roundtripper
2021-07-15 19:35:03 -07:00
Tõnis Tiigi 3790ea3f71
Merge pull request #2259 from tonistiigi/conn-limit2
new implementation for limiting tcp connections
2021-07-15 19:34:39 -07:00
Tonis Tiigi 30188347a3 contentutil: change offset to int64 to simplify
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-15 00:01:30 -07:00
Akihiro Suda 66d30551db
Merge pull request #2242 from tonistiigi/idle-conns
resolver: increase default idle conns reuse
2021-07-15 13:44:52 +09:00
Tonis Tiigi eaa3e100eb ensure wrappers support seeking to continue partial downloads
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-14 20:41:10 -07:00
Tonis Tiigi dc37a052b4 limited: allow extra high-priority connection for json requests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-14 20:41:10 -07:00
Tonis Tiigi f269d00f28 new implementation for limiting tcp connections
The previous implementation had many issues. Eg. on fetch, even if
the data already existed and no remote connections were needed
the request would still be waiting in the queue. Or if two fetches
of same blob happened together they would take up two places in queue
although there was only one remote request.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-14 20:41:02 -07:00
Tonis Tiigi 5a318dd017 tracing: update to otelhttp roundtripper
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-13 23:29:03 -07:00
Tonis Tiigi a558ac4cce add per domain semaphore to limit concurrent connections
This is a safer alternative until we figure out why
http.Transport based limiting fails.

Some connections like cache export/import do not have a
domain key atm and these connections use global pool.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-13 14:08:03 -07:00
Tõnis Tiigi 06e8602caa
Merge pull request #2236 from morlay/master
refactor to use `util/bklog.G(ctx)` instead `logrus.` directly
2021-07-13 00:25:22 -07:00
Morlay 18b49fd7dc refactor to use util/bklog instead of using logurs directly
Signed-off-by: Morlay <morlay.null@gmail.com>
2021-07-13 11:42:31 +08:00
Tonis Tiigi 782010121e resolver: increase default idle conns reuse
The current default were even lower than stdlib defaults.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-12 00:29:30 -07:00
Tonis Tiigi 936df190af remove tracetransform package
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-11 20:22:43 -07:00
Morlay 1ed2d45894 log with traceID and spanID
Signed-off-by: Morlay <morlay.null@gmail.com>
2021-07-09 12:53:57 +08:00
Tõnis Tiigi 9df59934cd
Merge pull request #2218 from tonistiigi/error-suggest
dockerfile: add suggestions to how to fix certain errors
2021-07-07 10:52:07 -07:00
Tonis Tiigi 277517e2a3 add error suggest pkg
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-02 17:29:27 -07:00
Akihiro Suda 1a7543a105
Merge pull request #2163 from tonistiigi/detect-otel-env 2021-07-03 01:01:34 +09:00
Akihiro Suda edc28d1b02
Merge pull request #2214 from tonistiigi/plain-error-logs
progressui: print logs for failed step as summary in plain mode
2021-07-01 17:09:15 +09:00
Tonis Tiigi 460ba750fd grpcerrors: avoid rpc error wrapping in error messages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-30 20:27:36 -07:00
Tonis Tiigi 600d2837b5 progressui: print logs for failed step as summary in plain mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-30 20:23:20 -07:00
Cory Bennett b1d441b175 [#2112] progress.FromContext returns a writer factory
this allows progress.Controller to manage the writer lifecycle

Signed-off-by: Cory Bennett <cbennett@netflix.com>
2021-06-28 18:58:29 +00:00
Cory Bennett 1da8b671c4 [#2112] progress.Controller should own the progress.Writer to prevent leaks
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2021-06-28 18:56:45 +00:00
Tonis Tiigi 3eec4287f6 flightcontrol: reduce contention between goroutines
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-22 22:10:47 -07:00
Tonis Tiigi 1d0597e85a handle unconfigured spans without errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-22 08:27:35 -07:00
Tonis Tiigi 14d606c289 client: pass delegated exporter as parameter
Avoid client package having dependency on global detect package.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:41 -07:00
Tonis Tiigi d512920c24 support collecting traces from llb.Exec
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi d8fc4e15f9 enable collecting traces via control api
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi 750f9af97c otlgrpc: provide a way to get otlp client from grpc conn
Hopefully this can be removed with a future upstream change
that could make this configurable. The package also needs
internal dependency that is copied in.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi b873f0b5f1 tracing: add delegated exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi 723ea5795c add transform package to convert from otlp
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi 69a8caa3be add current tracing context detection and exec propagation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit bc9a83144c83e9fd78007b7bfe92e8082c59d40e)
2021-06-20 21:57:35 -07:00
Tonis Tiigi 7489cc8be0 vendor: update opentelemetry to 1.0.0-rc
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-19 10:02:26 -07:00
Tonis Tiigi c773a215c1 integration: add common context base to all integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-18 20:49:49 -07:00
Sebastiaan van Stijn c325f89fa1
replace uses of deprecated containerd/sys.RunningInUserNS()
This utility was moved to a separate package, which has no dependencies.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-18 11:14:26 +02:00
Tonis Tiigi 7849ab58eb retryhandler: use net.ErrClosed for error check
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-17 16:55:37 -07:00
Tonis Tiigi b10f25944b correctly validate span from context
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 21:11:27 -07:00
Tonis Tiigi 8f50bae3f1 replace opentracing with opentelemetry tracers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 21:11:27 -07:00
Tonis Tiigi 292f1faf12 add support for opentelemetry
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 21:11:22 -07:00
Tonis Tiigi b97d0f7dab vendor: update vt100 to fork and remove replace rule
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 19:30:51 -07:00
Akihiro Suda 59d2f76e5e
Merge pull request #2161 from tonistiigi/auth-context
session: make sure all token request keep correct context
2021-06-11 14:38:40 +09:00
ktock 1764b3b249 Enable stargz snapshotter to use session for snapshot auth
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2021-06-09 16:10:08 +09:00
Tonis Tiigi 53e7116197 session: make sure all token request keep correct context
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-08 21:17:35 -07:00
Tõnis Tiigi 03af083def
Merge pull request #2144 from thaJeztah/bump_golang
update to go 1.16
2021-06-08 10:30:33 -07:00
Sebastiaan van Stijn 12c9920fb5
move RegistryConfig to resolver package
This allows using the resolver package without having to import
the buildkit daemon configuration.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-08 12:59:46 +02:00
Tonis Tiigi 19453d5acc test: fix mirror cache handling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-07 18:59:32 -07:00
Sebastiaan van Stijn 22dd74ae93
update to go 1.16
This updates all occurrences of Go 1.13 to Go 1.16; also updated
the code that's used to redact credentials in URLs to use the Go
implementation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-02 00:31:57 +02:00
Sebastiaan van Stijn 056afec140
generated files: update google/protobuf v1.3.5, and fix install for go modules
This patch updates the script and Dockerfile to prevent issues when using go
modules.

The first change is to use a plain `git clone` instead of `go get -d` to download
the source. While (like "pre go-modules") `go get -d` won't *build* the binaries
when go modules are used, it *will* use go modules to download the package
(and dependencies); as a result:

- no git repository will be cloned in gopath
- go modules will be downloaded for "master" (not the version that we specify
  to build)

Note: Once we update to Go 1.16, this script could be updated to use `go install <repo>@version`

The second change is an update to the `update-generated-files` script to detect
the correct version of google/protobuf to use from the `go.mod`'s  `replace` rule,
to make sure we generate (and verify) using the correct version.

The Dockerfile was also updated to update the default versions specified in the
PROTOBUF_VERSION and GOGO_VERSION build-args (although not strictly necessary).

Regenerating the files with this version resulted in a minor formatting change.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-01 23:23:53 +02:00
Tonis Tiigi 2bba968fc5 progressui: don't print vertex digest
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-05-20 18:45:34 -07:00
Tõnis Tiigi 75f3315583
Merge pull request #2017 from AkihiroSuda/containerd-15
Dockerfile: update containerd to v1.5.0-rc.2 / v1.4.4
2021-04-26 16:31:08 -07:00
Corey Larson 9b7a5fc618 Remove potentially expired tokens.
Some registries (notably Quay) issue tokens that expire without providing an `expires in` value in the authorization payload. Therefore, if a token produces a 401, we should remove it and re-fetch.

Signed-off-by: Corey Larson <corey@earthly.dev>
2021-04-21 14:13:58 -06:00