Commit Graph

24 Commits

Author SHA1 Message Date
Maksym Pavlenko
b88ab5af4f Wire task address and version fields
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-05-18 13:37:19 -07:00
Sebastiaan van Stijn
ff8a70cc0f client: modernize: any
go install golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest
    modernize -any -fix ./...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-03-15 18:24:14 +01:00
Cindia-blue
fb295b9d4f Tracing: add spans in task/metadata and sandbox paths
This PR adds opt-in tracing spans/attributes in CRI image pull and selected sandbox-related paths to improve debugging and correlation (e.g., sandbox.id/pod metadata). If maintainers prefer a smaller diff, I’m happy to split this into a pull-only PR plus follow-ups.
• follow-up after pull-only PR
• focuses on task/metadata/sandbox/cni setup spans

Signed-off-by: Cindy Li <cindyli@pinterest.com>
2026-01-09 00:05:37 +00:00
Derek McGowan
f8fc4698ae Merge pull request #11509 from vvoland/client-lazy-runtime
client/New: Don't unlazy the gRPC connection implicitly
2025-07-09 17:20:02 +00:00
Iceber Gu
b8649bd38c client: fix returned error in the defer function
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2025-04-18 10:02:05 +08:00
Iceber Gu
ec3567d6b3 update taskOptions based on runtimeOptions when creating a task
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2025-03-26 14:58:34 +08:00
Paweł Gronowski
8bc62da9c0 client/New: Don't unlazy the gRPC connection implicitly
When moving to gRPC 1.64 (commit 63b4688175) the usage of the deprecated
`grpc.DialContext` was replaced with `grpc.NewClient`. However, this
change also required to drop the `WithBlock` option, which made sure
that the connection is actually established before returning.

Now, `grpc.NewClient` doesn't attempt to perform the connection but
defers it to the actual first RPC.

Querying the default runtime on client creation breaks that property
depending on whether the default namespace is set or not.

This commit defers the `runtime` field initialization to the first time
the field is actually needed.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-11 13:47:30 +01:00
Derek McGowan
2f24aa00a5 Update errdefs to 0.3.0
Uses the new github.com/containerd/errdefs/pkg module which is intended
to hold less stable utility functions separately from the stable
github.com/containerd/errdefs error types.

Includes temporary update to hcsshim until a release is cut there

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-18 16:04:54 -07:00
Swagat Bora
c0cdcb34f1 Add spans to CRI runtime service and related client methods
This adds otel spans to CRI service mainly targeting mutating apis which includes:
* Sandbox apis - RunPodSandbox, StopPodSandbox, RemovePodSandbox
* Container apis - CreateContainer, StartContainer, StopContainer, RemoveContainer
* Attach, Exec and Exec Sync
* Containerd client methods: container.go, client.go, process.go and task.go

Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-08-05 02:34:20 +00:00
Akhil Mohan
300fd770a0 use typeurl funcs for marshalling anypb.Any
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-07-10 22:26:27 +05:30
Derek McGowan
2ac2b9c909 Make api a Go sub-module
Allow the api to stay at the same v1 go package name and keep using a
1.x version number. This indicates the API is still at 1.x and allows
sharing proto types with containerd 1.6 and 1.7 releases.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 11:03:00 -07:00
Derek McGowan
e1b94c0e7d Move protobuf package under pkg
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:03 -07:00
Derek McGowan
4a45507772 Move runc options to api directory
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:00 -07:00
Derek McGowan
fb9b59a843 Switch to new errdefs package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-25 22:18:45 -08:00
Derek McGowan
dbc74db6a1 Move runtime to core/runtime
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:58:04 -08:00
Derek McGowan
de606680b0 Move rootfs to pkg/rootfs
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:56:07 -08:00
Derek McGowan
e59f64792b Move oci to pkg/oci
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:55:48 -08:00
Derek McGowan
44a836c9b5 Move errdefs to pkg/errdefs
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:54:45 -08:00
Derek McGowan
b0c3d00e98 Move cio to pkg/cio
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:54:27 -08:00
Derek McGowan
6e5408dcec Move mount to core/mount
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:52:12 -08:00
Derek McGowan
57ea8aef3d Move images to core/images
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:51:26 -08:00
Derek McGowan
913edcd489 Move diff to core/diff
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:51:17 -08:00
Derek McGowan
21b4f3f0aa Move content to core/content
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:50:32 -08:00
Derek McGowan
261e01c2ac Move client to subpackage
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 10:37:00 -07:00