Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/178973
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5ef1f64 with merge base 860948a ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot rebase -b main |
|
@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here |
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
Signed-off-by: Huy Do <[email protected]>
|
Successfully rebased |
a4cc687 to
6095716
Compare
|
Oh, need to fix lint |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…ytorch#178973) The previous changes to setup-linux to support OSDC (setup-uv, choose compiler, switch CUDA version) are needed only if we want to use a single base Docker image for all CI jobs. After chatting with @malfet, we have decided to not do that for now and stick with the existing Docker images for the purpose of OSDC migration. So, the above said logic can be cleaned up. We can add them back later if needed. On the other hand, there are 2 issues need to be fixed when using existing Docker images: * ARC has switched to uid 1001 actions/runner-images#10936 since last year, and that uid is the one all the hooks are using. This conflicts with the current PyTorch CI image are still using uid 1000 or `ec2-user`. We can update the uid to 1001 eventually when everything migrates to ARC * ~~Checkout is now done inside the container, and the git version on CI image is too old to support treeless checkout~~ @malfet has fixed this by upgrading git version in pytorch#179025 ### Testing Using pytorch#177992 to run this GHA change at https://github.com/pytorch/pytorch/actions/runs/23842872594 Pull Request resolved: pytorch#178973 Approved by: https://github.com/malfet, https://github.com/yangw-dev
…178973) The previous changes to setup-linux to support OSDC (setup-uv, choose compiler, switch CUDA version) are needed only if we want to use a single base Docker image for all CI jobs. After chatting with @malfet, we have decided to not do that for now and stick with the existing Docker images for the purpose of OSDC migration. So, the above said logic can be cleaned up. We can add them back later if needed. On the other hand, there are 2 issues need to be fixed when using existing Docker images: * ARC has switched to uid 1001 actions/runner-images#10936 since last year, and that uid is the one all the hooks are using. This conflicts with the current PyTorch CI image are still using uid 1000 or `ec2-user`. We can update the uid to 1001 eventually when everything migrates to ARC * ~~Checkout is now done inside the container, and the git version on CI image is too old to support treeless checkout~~ @malfet has fixed this by upgrading git version in #179025 ### Testing Using #177992 to run this GHA change at https://github.com/pytorch/pytorch/actions/runs/23842872594 Pull Request resolved: #178973 Approved by: https://github.com/malfet, https://github.com/yangw-dev
…ytorch#178973) The previous changes to setup-linux to support OSDC (setup-uv, choose compiler, switch CUDA version) are needed only if we want to use a single base Docker image for all CI jobs. After chatting with @malfet, we have decided to not do that for now and stick with the existing Docker images for the purpose of OSDC migration. So, the above said logic can be cleaned up. We can add them back later if needed. On the other hand, there are 2 issues need to be fixed when using existing Docker images: * ARC has switched to uid 1001 actions/runner-images#10936 since last year, and that uid is the one all the hooks are using. This conflicts with the current PyTorch CI image are still using uid 1000 or `ec2-user`. We can update the uid to 1001 eventually when everything migrates to ARC * ~~Checkout is now done inside the container, and the git version on CI image is too old to support treeless checkout~~ @malfet has fixed this by upgrading git version in pytorch#179025 ### Testing Using pytorch#177992 to run this GHA change at https://github.com/pytorch/pytorch/actions/runs/23842872594 Pull Request resolved: pytorch#178973 Approved by: https://github.com/malfet, https://github.com/yangw-dev
…ytorch#178973) The previous changes to setup-linux to support OSDC (setup-uv, choose compiler, switch CUDA version) are needed only if we want to use a single base Docker image for all CI jobs. After chatting with @malfet, we have decided to not do that for now and stick with the existing Docker images for the purpose of OSDC migration. So, the above said logic can be cleaned up. We can add them back later if needed. On the other hand, there are 2 issues need to be fixed when using existing Docker images: * ARC has switched to uid 1001 actions/runner-images#10936 since last year, and that uid is the one all the hooks are using. This conflicts with the current PyTorch CI image are still using uid 1000 or `ec2-user`. We can update the uid to 1001 eventually when everything migrates to ARC * ~~Checkout is now done inside the container, and the git version on CI image is too old to support treeless checkout~~ @malfet has fixed this by upgrading git version in pytorch#179025 ### Testing Using pytorch#177992 to run this GHA change at https://github.com/pytorch/pytorch/actions/runs/23842872594 Pull Request resolved: pytorch#178973 Approved by: https://github.com/malfet, https://github.com/yangw-dev
…178973) The previous changes to setup-linux to support OSDC (setup-uv, choose compiler, switch CUDA version) are needed only if we want to use a single base Docker image for all CI jobs. After chatting with @malfet, we have decided to not do that for now and stick with the existing Docker images for the purpose of OSDC migration. So, the above said logic can be cleaned up. We can add them back later if needed. On the other hand, there are 2 issues need to be fixed when using existing Docker images: * ARC has switched to uid 1001 actions/runner-images#10936 since last year, and that uid is the one all the hooks are using. This conflicts with the current PyTorch CI image are still using uid 1000 or `ec2-user`. We can update the uid to 1001 eventually when everything migrates to ARC * ~~Checkout is now done inside the container, and the git version on CI image is too old to support treeless checkout~~ @malfet has fixed this by upgrading git version in #179025 ### Testing Using #177992 to run this GHA change at https://github.com/pytorch/pytorch/actions/runs/23842872594 Pull Request resolved: #178973 Approved by: https://github.com/malfet, https://github.com/yangw-dev
…ytorch#178973) The previous changes to setup-linux to support OSDC (setup-uv, choose compiler, switch CUDA version) are needed only if we want to use a single base Docker image for all CI jobs. After chatting with @malfet, we have decided to not do that for now and stick with the existing Docker images for the purpose of OSDC migration. So, the above said logic can be cleaned up. We can add them back later if needed. On the other hand, there are 2 issues need to be fixed when using existing Docker images: * ARC has switched to uid 1001 actions/runner-images#10936 since last year, and that uid is the one all the hooks are using. This conflicts with the current PyTorch CI image are still using uid 1000 or `ec2-user`. We can update the uid to 1001 eventually when everything migrates to ARC * ~~Checkout is now done inside the container, and the git version on CI image is too old to support treeless checkout~~ @malfet has fixed this by upgrading git version in pytorch#179025 ### Testing Using pytorch#177992 to run this GHA change at https://github.com/pytorch/pytorch/actions/runs/23842872594 Pull Request resolved: pytorch#178973 Approved by: https://github.com/malfet, https://github.com/yangw-dev
…ytorch#178973) The previous changes to setup-linux to support OSDC (setup-uv, choose compiler, switch CUDA version) are needed only if we want to use a single base Docker image for all CI jobs. After chatting with @malfet, we have decided to not do that for now and stick with the existing Docker images for the purpose of OSDC migration. So, the above said logic can be cleaned up. We can add them back later if needed. On the other hand, there are 2 issues need to be fixed when using existing Docker images: * ARC has switched to uid 1001 actions/runner-images#10936 since last year, and that uid is the one all the hooks are using. This conflicts with the current PyTorch CI image are still using uid 1000 or `ec2-user`. We can update the uid to 1001 eventually when everything migrates to ARC * ~~Checkout is now done inside the container, and the git version on CI image is too old to support treeless checkout~~ @malfet has fixed this by upgrading git version in pytorch#179025 ### Testing Using pytorch#177992 to run this GHA change at https://github.com/pytorch/pytorch/actions/runs/23842872594 Pull Request resolved: pytorch#178973 Approved by: https://github.com/malfet, https://github.com/yangw-dev
The GH runner image creates GITHUB_WORKSPACE as uid 1001, while CI images commonly default to a uid 1000 user mirroring ec2-user -- pytorch's `USER jenkins` and executorch's `USER ci-user` both do. That user cannot unlink the workspace, so the first step of every job dies on rm: cannot remove '/__w/<repo>/<repo>': Permission denied and every later step skips. It only surfaces with a non-root image, which is why jobs on pytorch/almalinux-builder never hit it. linux_job_v2 avoided this by running the same cleanup under sudo by default, gated on its no-sudo input; v3 dropped both. Restore the equivalent with a chmod rather than `sudo rm`, so the GH hook (uid 1001) can still clean up after the job -- the same fix pytorch/pytorch carries in .github/actions/setup-linux for its ARC path, added in pytorch/pytorch#178973. The chmod is only reached when the plain rm fails, so an image running as root succeeds first time and never calls sudo, which nvidia/cuda and bare distro images do not ship. Both branches are covered in test_linux_job_v3.yml: test-docker-image now asserts it runs as root, and test-non-root-docker-image runs against a uid 1000 pytorch CI image, which fails without this change. Authored with Claude Code.
The GH hook creates GITHUB_WORKSPACE as uid 1001, while CI images commonly default to a uid 1000 user mirroring ec2-user -- pytorch's `USER jenkins` and executorch's `USER ci-user` both do. That user cannot unlink the workspace, so `Clean workspace` died on rm: cannot remove '/__w/<repo>/<repo>': Permission denied before any other step ran. It only surfaces with a non-root image, which is why jobs on pytorch/almalinux-builder never hit it. An OSDC pod is ephemeral, so there is nothing to clean in the first place: the workspace starts empty, and the failing rm was carried over from v2, where EC2 runners were reused. What a job actually needs is to be able to write into the directory the hook made, so chmod it and drop the removal. This is what pytorch/pytorch does in .github/actions/setup-linux for its ARC path, added in pytorch/pytorch#178973. Note chmod alone would not have rescued the rm: unlinking the workspace needs write on its parent, which chmodding the workspace does not grant. Root images can already write and often ship no sudo, so the chmod tolerates failure. Both paths are covered in test_linux_job_v3.yml: test-docker-image asserts it runs as root, and test-non-root-docker-image runs against a uid 1000 pytorch CI image and probes that the workspace is writable. Authored with Claude Code.
…8665) `Clean workspace`, the first step of every v3 job, dies with a non-root image: ``` rm: cannot remove '/__w/executorch/executorch': Permission denied ``` and every later step skips. The GH hook creates `GITHUB_WORKSPACE` as uid 1001 ([runner-images#10936](actions/runner-images#10936)), while CI images commonly default to a uid 1000 user mirroring `ec2-user` — pytorch's `USER jenkins` and executorch's `USER ci-user` both do. It only surfaces with a non-root image, which is why jobs on `pytorch/almalinux-builder` have never hit it. Reproducer: [pytorch/executorch#22245](pytorch/executorch#22245), the first v3 caller to pass a repo CI image. **An OSDC pod is ephemeral, so there is nothing to clean.** The workspace starts empty — the failing `rm -rfv` printed no `removed` lines before erroring — and the step is carried over from v2, where EC2 runners were reused between jobs. What a job actually needs is to be able to write into the directory the hook created, so this chmods it and drops the removal, which is what pytorch/pytorch does in [`.github/actions/setup-linux`](https://github.com/pytorch/pytorch/blob/d3b8bf0a11cba909aac9e8cdf8b81af8d59a251e/.github/actions/setup-linux/action.yml#L53-L63) for its ARC path ([pytorch/pytorch#178973](pytorch/pytorch#178973)). Worth recording: adding a chmod *before* the `rm` does not work, and the test below caught it. Unlinking the workspace needs write on its parent `/__w/<repo>`, which chmodding the workspace does not grant — the chmod succeeded and the `rm` failed anyway. Root images can already write and often ship no `sudo` (`nvidia/cuda`, bare distro images), so the chmod tolerates failure rather than being gated on a user check. ## Tests `test_linux_job_v3.yml` covers both paths: - `test-docker-image` (`ghcr.io/pytorch/test-infra:cpu-x86_64-latest`) asserts `id -u` is 0, pinning the root path that must not require sudo. - `test-non-root-docker-image` is new, on `ghcr.io/pytorch/ci-image:pytorch-linux-jammy-py3.10-clang21` — a uid 1000 `USER jenkins` image. It asserts a non-root user, probes that the workspace is writable, and checks the checkout produced a git repo. It fails on `main` today. Authored with Claude Code.
The previous changes to setup-linux to support OSDC (setup-uv, choose compiler, switch CUDA version) are needed only if we want to use a single base Docker image for all CI jobs. After chatting with @malfet, we have decided to not do that for now and stick with the existing Docker images for the purpose of OSDC migration. So, the above said logic can be cleaned up. We can add them back later if needed.
On the other hand, there are 2 issues need to be fixed when using existing Docker images:
ec2-user. We can update the uid to 1001 eventually when everything migrates to ARCCheckout is now done inside the container, and the git version on CI image is too old to support treeless checkout@malfet has fixed this by upgrading git version in [CI] Add git-core PPA to Docker base image for newer git #179025Testing
Using #177992 to run this GHA change at https://github.com/pytorch/pytorch/actions/runs/23842872594