Skip to content

Commit

Permalink
Fix permission denied error at checkout step in OSS CI (#2204)
Browse files Browse the repository at this point in the history
Summary:
OSS CI jobs often failed at checkout step with error
`Error: File was unable to be removed
Error: EACCES: permission denied, rmdir '/home/ec2-user/actions-runner/_work/FBGEMM/FBGEMM/3'`

This is because during the build process of one job, the script executes installations of dependencies in the folder under different user (ie.e,`root` in Nova job). In the subsequent job run on the same runner, `ec2-user` tries to clean up the folder but unable able to, causing the permission denied error.
For example, https://github.com/pytorch/FBGEMM/actions/runs/7151275180/job/19475677899 all failed because the runners were used to build wheel in the previous job, i.e. https://github.com/pytorch/FBGEMM/actions/runs/7150909712/job/19474677106.

Pull Request resolved: #2204

Reviewed By: q10, huydhn

Differential Revision: D52054787

fbshipit-source-id: f363e1c948ffe9b95f1d384bbca521faa78c12b9
  • Loading branch information
spcyppt authored and facebook-github-bot committed Dec 12, 2023
1 parent b4db4a7 commit 9747336
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/scripts/nova_postscript.bash
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ fi
$CONDA_RUN python3 -c "import torch; print('cuda.is_available() ', torch.cuda.is_available()); print ('device_count() ',torch.cuda.device_count());"
cd "${FBGEMM_REPO}/fbgemm_gpu/test" || { echo "[NOVA] Failed to cd to fbgemm_gpu/test from $(pwd)"; };
run_fbgemm_gpu_tests "${BUILD_ENV_NAME}" "${CPU_GPU}"

# Workaround EACCES: permission denied error at checkout step
chown -R 1000:1000 /__w/FBGEMM/FBGEMM/ || echo "Unable to chown 1000:1000 from $USER, uid: $(id -u)"

0 comments on commit 9747336

Please sign in to comment.