Skip to content

[release/1.5] Output a warning for label image labels instead of erroring#6187

Merged
AkihiroSuda merged 1 commit intocontainerd:release/1.5from
ktock:1.5-fix-config-label
Nov 4, 2021
Merged

[release/1.5] Output a warning for label image labels instead of erroring#6187
AkihiroSuda merged 1 commit intocontainerd:release/1.5from
ktock:1.5-fix-config-label

Conversation

@ktock
Copy link
Copy Markdown
Member

@ktock ktock commented Oct 31, 2021

This patch seems to needed to fix kubernetes-sigs/kind#2518.
Backporting from #6124 (fixes #6123).

This change ignore errors during container runtime due to large
image labels and instead outputs warning. This is necessary as certain
image building tools like buildpacks may have large labels in the images
which need not be passed to the container.

Signed-off-by: Sambhav Kothari [email protected]
(cherry picked from commit 2a8dac1)
Signed-off-by: Kohei Tokunaga [email protected]

This change ignore errors during container runtime due to large
image labels and instead outputs warning. This is necessary as certain
image building tools like buildpacks may have large labels in the images
which need not be passed to the container.

Signed-off-by: Sambhav Kothari <[email protected]>
(cherry picked from commit 2a8dac1)
Signed-off-by: Kohei Tokunaga <[email protected]>
@ktock ktock force-pushed the 1.5-fix-config-label branch from cfa52db to b988fc9 Compare October 31, 2021 05:44
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Oct 31, 2021

Build succeeded.

labels := make(map[string]string)
for k, v := range imageLabels {
labels[k] = v
if err := clabels.Validate(k, v); err == nil {
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.

I don't remember why we limit the size of key/value. Is it possible to remove the limitation?

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.

We can discuss that in a separate issue / PR for the main branch, and then consider backporting.

Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@kzys kzys left a comment

Choose a reason for hiding this comment

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

LGTM since it is consistent with 1.6.x. Generally don't like warnings since people tend to ignore/miss them though.

@aojea
Copy link
Copy Markdown
Contributor

aojea commented Nov 3, 2021

/cc

@k8s-ci-robot
Copy link
Copy Markdown

@aojea: GitHub didn't allow me to request PR reviews from the following users: aojea.

Note that only containerd members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc

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/test-infra repository.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants