Skip to content

Fix sandbox task API endpoints for non-runc runtimes - #13360

Merged
samuelkarp merged 2 commits into
containerd:mainfrom
mxpv:task
May 19, 2026
Merged

samuelkarp merged 2 commits into
containerd:mainfrom
mxpv:task

Conversation

@mxpv

@mxpv mxpv commented May 7, 2026 •

Copy link
Copy Markdown
Member

I believe we overlooked this in #9736 and introduced task API address and version fields in Runc options.

Those are used in Sandbox API flow and have nothing to do with runc specifically.
As the result it doesn't work with other runtimes - #12986

This PR deprecates fields introduced in runc options and moves them to CreateTaskRequest.

Deprecate task API address and version fields in runc options and move to CreateTaskRequest

Copilot AI review requested due to automatic review settings May 7, 2026 22:02
@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review May 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes sandbox task API endpoint handling for non-runc runtimes by moving the task API endpoint fields out of runc-specific runtime options and into the generic Tasks CreateTaskRequest, while keeping backward compatibility via deprecated runc option fields.

Changes:

  • Add task_api_address / task_api_version to CreateTaskRequest and plumb them through the client and task service.
  • Deprecate task_api_address / task_api_version in runc options protos and generated code.
  • Switch the repo to use the in-tree ./api module via a replace, updating vendoring metadata accordingly.

Reviewed changes

Copilot reviewed 9 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vendor/modules.txt Updates vendoring metadata for github.com/containerd/containerd/api to use ./api.
vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto Marks runc option fields for task API endpoint as deprecated (vendored copy).
vendor/github.com/containerd/containerd/api/types/runc/options/oci.pb.go Regenerates vendored Go bindings with deprecation annotations.
vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto Adds task API endpoint fields to CreateTaskRequest (vendored copy).
vendor/github.com/containerd/containerd/api/LICENSE Removes vendored API module LICENSE file.
plugins/services/tasks/local.go Reads task API endpoint from CreateTaskRequest and keeps fallback to deprecated runc options.
go.sum Drops sums for the now-replaced github.com/containerd/containerd/api module.
go.mod Adds replace github.com/containerd/containerd/api => ./api.
client/task.go Extends TaskInfo to carry task API endpoint info.
client/task_opts.go Updates WithTaskAPIEndpoint to set TaskInfo fields instead of mutating runc options.
client/container.go Plumbs TaskInfo task API endpoint fields into CreateTaskRequest.
api/types/runc/options/oci.proto Marks runc option fields for task API endpoint as deprecated (source copy).
api/types/runc/options/oci.pb.go Regenerates Go bindings with deprecation annotations.
api/services/tasks/v1/tasks.proto Adds task API endpoint fields to CreateTaskRequest (source copy).
api/services/tasks/v1/tasks.pb.go Regenerates Go bindings for tasks service request fields.
api/next.txtpb Regenerates Buf descriptor output to reflect proto/API changes.
api/buf.lock Updates Buf dependency lock metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/services/tasks/local.go Resolved
Comment thread go.mod Resolved
@fidencio

fidencio commented May 7, 2026

Copy link
Copy Markdown
Contributor

cc @Apokleos, as this solves the issue you're hitting on kata-containers/kata-containers#12957

@mxpv, it'd be nice to have this one backported to the 2.3 branch

Thanks for the quick fix, btw! :-)

Copilot AI review requested due to automatic review settings May 7, 2026 22:12
@mxpv mxpv added kind/bug cherry-pick/2.3.x Change to be cherry picked to release/2.3 labels May 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 18 changed files in this pull request and generated 2 comments.

Comment thread client/task.go Resolved
Comment thread go.mod Resolved
@mxpv mxpv moved this from Needs Triage to Needs Reviewers in Pull Request Review May 11, 2026
fidencio added a commit to kata-containers/kata-containers that referenced this pull request May 18, 2026
containerd 2.3 requires Go 1.26.3, but Kata still pins Go 1.25.10.
Use Go 1.26.3 for the sandbox-api job so that make cri-integration
can build containerd from source.

Checkout containerd/containerd#13360 which moves the task API
address/version fields out of runc-specific options into
CreateTaskRequest, fixing the sandbox API flow for non-runc runtimes.

Signed-off-by: Fabiano Fidêncio <[email protected]>

@fidencio fidencio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, and has been tested on the Kata Containers side.
thanks, @mxpv!

Comment thread plugins/services/tasks/local.go Resolved

@dims dims left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

there's a comment from @samuelkarp though :)

@github-project-automation github-project-automation Bot moved this from Needs Reviewers to Review In Progress in Pull Request Review May 18, 2026

@mikebrow mikebrow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
see note to self regarding lack of doc/defaulting for these two fields being deprecated as runc options

// task api address, can be a unix domain socket, or vsock address.
// it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://<vsock cid>:<port>.
string task_api_address = 12;
string task_api_address = 12 [deprecated = true];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self... these two now deprecated fields taskapiaddress and taskapiversion were never documented in the config.md, nor defaulted for display with the containerd config default command.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 19 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • api/services/tasks/v1/tasks.pb.go: Language not supported
  • api/types/runc/options/oci.pb.go: Language not supported

Comment thread client/task.go Resolved
@mxpv
mxpv requested a review from dmcgowan May 18, 2026 20:44
CgroupV1: "The support for cgroup v1 is deprecated since containerd v2.2 and will be removed by no later than May 2029. Upgrade the host to use cgroup v2.",
CRIEnableCDI: "The `enable_cdi` property of `[plugins.\"io.containerd.cri.v1.runtime\"]` is deprecated, will be removed in containerd v2.3, and CDI support will always be enabled.",

RuncOptionsTaskAPIAddress: "The `task_api_address` field in runc options is deprecated since containerd v2.3. Set `task_api_address` on CreateTaskRequest instead.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 2.3? Planning to cherry-pick this back?

@mxpv mxpv May 18, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it'd be good to cherry-pick this to 2.3

@samuelkarp
samuelkarp enabled auto-merge May 18, 2026 23:35
@samuelkarp
samuelkarp added this pull request to the merge queue May 19, 2026
Merged via the queue into containerd:main with commit ae843af May 19, 2026
161 of 181 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review May 19, 2026
@mxpv

mxpv commented May 19, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release/2.3

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@mxpv: new pull request created: #13422

Details

In response to this:

/cherry-pick release/2.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mxpv
mxpv deleted the task branch May 19, 2026 18:08
@dmcgowan dmcgowan added cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch cherry-picked/2.3.x PR commits are cherry picked into release/2.3 branch and removed cherry-pick/2.3.x Change to be cherry picked to release/2.3 labels May 20, 2026
@dmcgowan dmcgowan added the area/runtime Runtime label Jul 28, 2026
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
containerd 2.4.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>Welcome to the v2.4.0 release of containerd!

containerd 2.4 is a regular (non-LTS) release with a shorter support window,
intended for users who want to adopt new features sooner. As the release
following the 2.3 LTS, it is the point in the release cycle where previously
deprecated features may be removed, so this release may include breaking
changes; check the notes below and clear any deprecation warnings from your
current version before upgrading.

Users prioritizing stability and a longer support lifecycle should stay on the
2.3 LTS release.

### Highlights

#### Container Runtime Interface (CRI)

* Enable mount manager for image mounts in CRI ([#13542](containerd/containerd#13542))
* Export sandbox image and CNI directory configuration in CRI plugin info ([#13940](containerd/containerd#13940))
* Set default runtimeFeatures.UserNamespacesHostNetwork to true ([#13162](containerd/containerd#13162))
* Support OCI runtime feature introspection for non-runc runtimes ([#13504](containerd/containerd#13504))

#### Image Distribution

* Apply hardening to strip sensitive authentication headers when fetching descriptor URLs ([#12889](containerd/containerd#12889))
* Support propagating HTTP 299 warning headers from registries to the resolver ([#12698](containerd/containerd#12698))
* Use klauspost/compress for gzip layer decompression ([#13560](containerd/containerd#13560))

#### Image Storage

* Add client options to fetch all layer content during unpack even when snapshots exist ([#14126](containerd/containerd#14126))
* Include media type in content create events ([#13833](containerd/containerd#13833))
* Add forward References to the GC collection context ([#13634](containerd/containerd#13634))

#### Node Resource Interface (NRI)

* Expose container image name, digest, and config digest to NRI plugins ([#13960](containerd/containerd#13960))
* Emit deprecation warnings for plugins using deprecated NRI interfaces ([#13916](containerd/containerd#13916))

#### Runtime

* Mask /proc/interrupts and CPU thermal throttle sysfs paths in Linux containers by default ([#14090](containerd/containerd#14090))
* Add UpdateSandbox RPC to propagate sandbox controller updates to the shim ([#14105](containerd/containerd#14105))
* Avoid immediately restarting containers with restart=always policy after they are explicitly stopped ([#13993](containerd/containerd#13993))
* Pass tracing context from shim to runc and hooks ([#14036](containerd/containerd#14036))
* Fix user and group lookup failures in container rootfs containing symlinked /etc/passwd or /etc/group ([#13818](containerd/containerd#13818))
* Implement Windows named-pipe server and log streaming support in pkg/shim ([#13948](containerd/containerd#13948))
* Enable log scrubbing by default on Windows ([#13837](containerd/containerd#13837))
* Allow specifying parent checkpoint directory when checkpointing with runc ([#13699](containerd/containerd#13699))

#### Snapshotters

* Add Prometheus metrics for EROFS snapshotter layer content cache ([#13941](containerd/containerd#13941))
* Support warm image cache for erofs snapshotter ([#13813](containerd/containerd#13813))
* Add max size label for snapshots ([#13520](containerd/containerd#13520))

#### Breaking

* Remove deprecated CRI and tracing configuration options:
  * Remove `enable_cdi` in CRI runtime configuration (CDI is now always enabled)
  * Remove `bin_dir` in CRI CNI configuration (use `bin_dirs`)
  * Remove `endpoint`, `protocol`, and `insecure` in OTLP tracing processor configuration (use standard OTLP environment variables)
  * Remove `service_name` and `sampling_ratio` in internal tracing configuration (use standard OpenTelemetry environment variables) ([#14166](containerd/containerd#14166))
* Remove restore in CreateContainer ([#13871](containerd/containerd#13871))

#### Deprecations

* Deprecate containerd.io/runtime-allow-mounts shim annotation in favor of MountCapabilities bootstrap extension ([#14002](containerd/containerd#14002))
* Remove deprecated shim.Command from pkg ([#13991](containerd/containerd#13991))
* Deprecate task API address and version fields in runc options and move to CreateTaskRequest ([#13360](containerd/containerd#13360))

Please try out the release binaries and report any issues at
https://github.com/containerd/containerd/issues.

### Contributors

* Maksym Pavlenko
* Sebastiaan van Stijn
* Samuel Karp
* Derek McGowan
* Wei Fu
* Akihiro Suda
* Mike Brown
* Paweł Gronowski
* Chris Henzie
* Phil Estes
* Brian Goff
* Austin Vazquez
* ningmingxiao
* Jordan Liggitt
* Akhil Mohan
* Eshaan Mathur
* Krisztian Litkey
* Chris Ayoub
* Kazuyoshi Kato
* Kir Kolyshkin
* Sergey Kanzhelev
* Ahmet Alp Balkan
* Arpit Jain
* Cindy Li
* Damien Grisonnet
* Esteban Ginez
* Gao Xiang
* Harsh Rawat
* Laura Lorenz
* Maksim An
* Oleh Konko
* Philip Laine
* Abhishek Bhunia
* Alan Grosskurth
* Albin Kerouanton
* Alex Lyn
* Aman Raj
* Amir Alavi
* Amit Barve
* Andrew Halaney
* AprilNEA
* Arjun Yogidas
* Ayato Tokubi
* Aysha Afrah Ziya
* Ben Cressey
* Bing Hongtao
* Chris Crone
* Craig Gumbley
* Daniel De Graaf
* Davanum Srinivas
* Dr. Jan-Philip Gehrcke
* Harshal Patel
* Henry Wang
* Hsiu-Chi Tsai
* JP Phillips
* Jing Chen
* Kohei Tokunaga
* LEI WANG
* Martín Fernández
* Mikhail Dmitrichenko
* Nahum Litvin
* Nikolaus Schuetz
* Pablo Garcia Caceres
* Paco Xu
* Robert Cronin
* SaloniRathi
* Shambhavi Srivastava
* Tianon Gravi
* XlabAI
* Yuanliang Zhang
* ayush-panta
* crawfordxx
* cshung
* match man
* s3onghyun
* 归寂
* 徐晓伟

### Changes
<details><summary>658 commits</summary>
<p>

  * [`647fafa847`](containerd/containerd@647fafa) Prepare release notes for v2.4.0
* Prepare release notes for api/v1.12.0 ([#14170](containerd/containerd#14170))
  * [`5c4ea21de3`](containerd/containerd@5c4ea21) Prepare release notes for api/v1.12.0
* Deprecations and removals for 2.4 ([#14166](containerd/containerd#14166))
  * [`531b3a37b9`](containerd/containerd@531b3a3) tracing: remove deprecated tracing config options
  * [`ca8579a334`](containerd/containerd@ca8579a) tracing: add tests for otlp exporter and env vars
  * [`ee024b7c99`](containerd/containerd@ee024b7) tracing: remove deprecated otlp configs
  * [`f7c654fb4f`](containerd/containerd@f7c654f) cri: remove deprecated cni bin_dir
  * [`4f7de25abb`](containerd/containerd@4f7de25) cri: remove enable_cdi config option
  * [`830b48d3fd`](containerd/containerd@830b48d) cri: delay registry config removal to 2.7
* Prepare release notes for v2.4.0-rc.0 ([#14115](containerd/containerd#14115))
  * [`c02620e398`](containerd/containerd@c02620e) Prepare release notes for v2.4.0-rc.0
  * [`02c7c97f43`](containerd/containerd@02c7c97) Update release doc for 2.4.0 release
  * [`484e5aba58`](containerd/containerd@484e5ab) vendor: github.com/containerd/containerd/api v1.12.0-rc.1
  * [`67174d675c`](containerd/containerd@67174d6) mailmap: add Paweł Gronowski
* Update erofs snapshotter to record blob source ([#14107](containerd/containerd#14107))
  * [`697a7571a4`](containerd/containerd@697a757) erofs: give a dm-verity device a name unique to its mount
  * [`f75817eb3b`](containerd/containerd@f75817e) erofs: record where a layer blob is
  * [`d92088d822`](containerd/containerd@d92088d) erofs: refuse to apply into a read-only snapshot
  * [`8cc0b076a6`](containerd/containerd@8cc0b07) erofs: serve layer content cache on parented Prepare
* build(deps): bump the golang-x group with 4 updates ([#14150](containerd/containerd#14150))
  * [`75138b3fda`](containerd/containerd@75138b3) build(deps): bump the golang-x group with 4 updates
* build(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.0 ([#14153](containerd/containerd#14153))
  * [`353342cae6`](containerd/containerd@353342c) build(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.0
* pkg/oci: mask thermal interrupt info ([#14090](containerd/containerd#14090))
  * [`c176f185b0`](containerd/containerd@c176f185b08e14bde055d81dc509

See merge request: Harmonybrew/homebrew-core!20372
@mxpv

mxpv commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release/2.0

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@mxpv: #13360 failed to apply on top of branch "release/2.0":

Applying: protos: include task API address to CreateTaskRequest
Using index info to reconstruct a base tree...
A	api/buf.lock
A	api/next.txtpb
M	api/services/tasks/v1/tasks.pb.go
M	api/services/tasks/v1/tasks.proto
M	api/types/runc/options/oci.pb.go
M	api/types/runc/options/oci.proto
M	go.mod
M	go.sum
M	vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go
M	vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto
M	vendor/github.com/containerd/containerd/api/types/runc/options/oci.pb.go
M	vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto
M	vendor/modules.txt
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): api/buf.lock deleted in HEAD and modified in protos: include task API address to CreateTaskRequest.  Version protos: include task API address to CreateTaskRequest of api/buf.lock left in tree.
CONFLICT (modify/delete): api/next.txtpb deleted in HEAD and modified in protos: include task API address to CreateTaskRequest.  Version protos: include task API address to CreateTaskRequest of api/next.txtpb left in tree.
Auto-merging api/services/tasks/v1/tasks.pb.go
CONFLICT (content): Merge conflict in api/services/tasks/v1/tasks.pb.go
Auto-merging api/services/tasks/v1/tasks.proto
CONFLICT (content): Merge conflict in api/services/tasks/v1/tasks.proto
Auto-merging api/types/runc/options/oci.pb.go
CONFLICT (content): Merge conflict in api/types/runc/options/oci.pb.go
Auto-merging api/types/runc/options/oci.proto
CONFLICT (content): Merge conflict in api/types/runc/options/oci.proto
Auto-merging go.mod
Auto-merging go.sum
CONFLICT (content): Merge conflict in go.sum
Auto-merging vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go
CONFLICT (content): Merge conflict in vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go
Auto-merging vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto
CONFLICT (content): Merge conflict in vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto
Auto-merging vendor/github.com/containerd/containerd/api/types/runc/options/oci.pb.go
CONFLICT (content): Merge conflict in vendor/github.com/containerd/containerd/api/types/runc/options/oci.pb.go
Auto-merging vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto
CONFLICT (content): Merge conflict in vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto
Auto-merging vendor/modules.txt
CONFLICT (content): Merge conflict in vendor/modules.txt
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 protos: include task API address to CreateTaskRequest

Details

In response to this:

/cherry-pick release/2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/runtime Runtime cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch cherry-picked/2.3.x PR commits are cherry picked into release/2.3 branch impact/deprecation kind/bug size/XXL

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

10 participants