Skip to content

fix(build): update k8s-staging-test-infra image in integ tests#3865

Merged
dims merged 2 commits intogoogle:masterfrom
sambhav-jain-16:fix-integ-tests-job
Apr 14, 2026
Merged

fix(build): update k8s-staging-test-infra image in integ tests#3865
dims merged 2 commits intogoogle:masterfrom
sambhav-jain-16:fix-integ-tests-job

Conversation

@sambhav-jain-16
Copy link
Copy Markdown
Contributor

@sambhav-jain-16 sambhav-jain-16 commented Apr 13, 2026

Integration tests github action is failing due to the following error

Unable to find image 'gcr.io/k8s-staging-test-infra/bootstrap:v20250702-52f5173c3a' locally
docker: Error response from daemon: manifest for gcr.io/k8s-staging-test-infra/bootstrap:v20250702-52f5173c3a not found: manifest unknown: Failed to fetch "v20250702-52f5173c3a"

This PR aims to update the image to fix the failures

@sambhav-jain-16
Copy link
Copy Markdown
Contributor Author

@dims looks like there's a regression in the new image, the integ tests are failing. Can you tell me the source of the image?
I'll debug what is happening

@sambhav-jain-16
Copy link
Copy Markdown
Contributor Author

sambhav-jain-16 commented Apr 14, 2026

Took some help from agents

The new bootstrap image ships a newer version of Docker Engine and runc (the low-level container runtime). When you pass --cpu-shares 2048 to Docker on a cgroupv2 system, runc converts that value to cgroupv2's native cpu.weight format. The old runc used a simple linear formula https://github.com/opencontainers/runc/blob/d11f4d756e85ece5cdba8bb69f8bd4db3cdcbeab/libcontainer/cgroups/utils.go#L423-L428: weight = 1 + ((shares-2) * 9999) / 262142) which gives
cpu.weight = 79 for --cpu-shares 2048. Starting with runc v1.3.2, runc switched to using the opencontainers/cgroups package which replaced this with a logarithmic formula https://github.com/opencontainers/cgroups/blob/main/utils.go#L455-L470: weight = ceil(10^((log₂(shares)² + 125·log₂(shares))/612 - 7/34))), producing cpu.weight = 174 for the same input. cAdvisor's convertCPUWeightToCPULimit function was written to invert the old linear formula and hasn't been updated, so when it reads 174 and applies the old inverse, it computes 4537 instead of the expected 2046.

Sources:

auto-merge was automatically disabled April 14, 2026 10:51

Head branch was pushed to by a user without write access

@sambhav-jain-16
Copy link
Copy Markdown
Contributor Author

sambhav-jain-16 commented Apr 14, 2026

I have decided to fix the test to unblock rather than the actual code based on this comment.
If you feel we should fix the code, then LMK

@dims dims added this pull request to the merge queue Apr 14, 2026
Merged via the queue into google:master with commit e010e8f Apr 14, 2026
10 checks passed
@sambhav-jain-16 sambhav-jain-16 deleted the fix-integ-tests-job branch April 14, 2026 13:16
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.

2 participants