Skip to content

[2.2] Handle []byte envvar value#13455

Open
liggitt wants to merge 2 commits into
containerd:release/2.2from
liggitt:binary-env-2.2
Open

[2.2] Handle []byte envvar value#13455
liggitt wants to merge 2 commits into
containerd:release/2.2from
liggitt:binary-env-2.2

Conversation

@liggitt

@liggitt liggitt commented May 20, 2026

Copy link
Copy Markdown
Contributor

Part of recovering from a regression in the ability of v0.34.0+ cri-api being able to transmit binary non-utf8 envvar values

xref

cc @mikebrow @samuelkarp

This updates to a cri-api patch release that switched the proto type of the envvar value field from string to bytes, and adds a []byte → go string cast in the spot that handles this CRI field.

@liggitt

liggitt commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

(the vendor verification task of the "Project Checks" CI is expected to fail since this is monkeying with a vendored cri-api file ... other compile / test checks should succeed)

@liggitt liggitt changed the title WIP: POC: Handle []byte envvar value WIP: POC: [2.2] Handle []byte envvar value May 20, 2026
@thaJeztah

Copy link
Copy Markdown
Member

Wondering; has the same case also been tested on other runtimes? The "portable character set" would still be the recommended approach (depending on anything outside it would always be somewhat undefined behavior)

@liggitt

liggitt commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

Wondering; has the same case also been tested on other runtimes? The "portable character set" would still be the recommended approach (depending on anything outside it would always be somewhat undefined behavior)

Totally agree, this is mostly trying not to regress on an upgrade unintentionally due to plumbing errors. I think it would be fair game for a particular runtime to have rejected data outside a specified character set from day 1... doing so unintentionally and unannounced is ... less ok (this was caused by a proto encoder/decoder change in cri-api in Kubernetes 1.34 ... trying to recover from that now in as minimal a way as possible)

@thaJeztah

Copy link
Copy Markdown
Member

Oh! I just realized I commented on a backport, not the one from main. 🙈

@liggitt

liggitt commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

yeah, sorry for the context-free PR... summary and lots of discussion linked from kubernetes/kubernetes#139168 (comment)

liggitt added 2 commits June 12, 2026 18:23
Signed-off-by: Jordan Liggitt <liggitt@google.com>
Signed-off-by: Jordan Liggitt <liggitt@google.com>
@liggitt liggitt changed the title WIP: POC: [2.2] Handle []byte envvar value [2.2] Handle []byte envvar value Jun 12, 2026
@liggitt

liggitt commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

I'll update with picks from the final commits once the main PR merges

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

Labels

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

3 participants