Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit sanitized URLs to 200 characters #16061

Merged
merged 1 commit into from Oct 25, 2023

Conversation

hakman
Copy link
Member

@hakman hakman commented Oct 25, 2023

https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/kops/15705/pull-kops-e2e-aws-upgrade-k127-ko127-to-klatest-kolatest-many-addons/1717029831612305408/artifacts/3.106.193.247/kops-configuration.log

I1025 05:09:04.091422    5811 executor.go:210] Executing task "LoadImage.3": LoadImageTask: [https://storage.googleapis.com/k8s-staging-kops/pulls/pull-kops-e2e-aws-upgrade-k127-ko127-to-klatest-kolatest-many-addons/pull-2cd697aef2af30f47a7ba2b25fe8a7bc4245da97/1.29.0-alpha.2+v1.29.0-alpha.1-182-g6bc0b1129a/images/kube-apiserver-healthcheck-amd64.tar.gz]
W1025 05:09:04.091475    5811 load_image.go:78] LoadImageTask checking if image present not yet implemented
I1025 05:09:04.105782    5811 files.go:133] Hash matched for "/var/cache/nodeup/sha256:938e3e04191d655073493c73debc30ae9cb94c70f5b803f8be88f6c84683be72_kube-apiserver-healthcheck-amd64_tar_gz": sha256:938e3e04191d655073493c73debc30ae9cb94c70f5b803f8be88f6c84683be72
W1025 05:09:04.105966    5811 executor.go:140] error running task "LoadImage.3" (3m46s remaining to succeed): error ungzipping container image: open /tmp/loadimage3627355050/https___storage_googleapis_com_k8s-staging-kops_pulls_pull-kops-e2e-aws-upgrade-k127-ko127-to-klatest-kolatest-many-addons_pull-2cd697aef2af30f47a7ba2b25fe8a7bc4245da97_1_29_0-alpha_2_v1_29_0-alpha_1-182-g6bc0b1129a_images_kube-apiserver-healthcheck-amd64_tar_gz: file name too long
I1025

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 25, 2023
@hakman
Copy link
Member Author

hakman commented Oct 25, 2023

/test pull-kops-e2e-aws-upgrade-k127-ko127-to-klatest-kolatest-many-addons

@justinsb
Copy link
Member

Thanks @hakman. I was a little concerned that this is a utility function and truncation might not be appropriate, but in fact it's only used either with a hash or in a unique temp directory, so this works!

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 25, 2023
@justinsb
Copy link
Member

(We might want to see if we can come up with a better name though, like "BuildSafeFileName" or something like that )

@hakman
Copy link
Member Author

hakman commented Oct 25, 2023

/hold for test to finish

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 25, 2023
@hakman
Copy link
Member Author

hakman commented Oct 25, 2023

(We might want to see if we can come up with a better name though, like "BuildSafeFileName" or something like that )

@justinsb It is actually used only for URLs, so could just change to SanitizeURL?

@hakman
Copy link
Member Author

hakman commented Oct 25, 2023

After the fix:

I1025 12:48:46.177537    1295 http.go:121] Copying "https://storage.googleapis.com/k8s-staging-kops/pulls/pull-kops-e2e-aws-upgrade-k127-ko127-to-klatest-kolatest-many-addons/pull-9a3b11c71aa1607815afa5dc8945347e0a11607b/1.29.0-alpha.2+v1.29.0-alpha.1-178-g609bc00cb8/images/kube-apiserver-healthcheck-amd64.tar.gz" to "/var/cache/nodeup/sha256:05518ccf05ca1f2d10a6bcc53d71ebad3ee917640a1a6382bb2a507bd841c9c0_kube-apiserver-healthcheck-amd64_tar_gz" took "757.479491ms"
I1025 12:48:46.202886    1295 files.go:133] Hash matched for "/var/cache/nodeup/sha256:05518ccf05ca1f2d10a6bcc53d71ebad3ee917640a1a6382bb2a507bd841c9c0_kube-apiserver-healthcheck-amd64_tar_gz": sha256:05518ccf05ca1f2d10a6bcc53d71ebad3ee917640a1a6382bb2a507bd841c9c0
I1025 12:48:46.267089    1295 load_image.go:149] running command ctr --namespace k8s.io images import /tmp/loadimage2065503671/s-e2e-aws-upgrade-k127-ko127-to-klatest-kolatest-many-addons_pull-9a3b11c71aa1607815afa5dc8945347e0a11607b_1_29_0-alpha_2_v1_29_0-alpha_1-178-g609bc00cb8_images_kube-apiserver-healthcheck-amd64_tar_gz

@hakman
Copy link
Member Author

hakman commented Oct 25, 2023

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 25, 2023
@k8s-ci-robot k8s-ci-robot merged commit 0202741 into kubernetes:master Oct 25, 2023
22 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Oct 25, 2023
@hakman hakman deleted the limit-asset-length branch October 25, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants