pytorch / executorch

On-device AI across mobile, embedded and edge for PyTorch
https://pytorch.org/executorch/
Other
1.31k stars 206 forks source link

Only unset HOME when running cmake as root #3507

Closed dbort closed 2 weeks ago

dbort commented 2 weeks ago

This hack is required to work around pytorch/test-infra#5091, which runs some CI jobs as root, which buck2 doesn't like.

But we saw in #3502 that this can break things for some normal users.

Reduce the blast radius of this hack, only modifying HOME when actually running as root.

Mitigates #3502

Test Plan: ./install_requirements.sh succeeded locally.

The build-wheels jobs for this PR do not break during the buck2 phase, and show that they're unsetting HOME.

https://github.com/pytorch/executorch/actions/runs/8946028682/job/24575999986?pr=3507#step:14:118

2024-05-03T23:32:08.9616508Z temporarily unsetting HOME while running as root

https://github.com/pytorch/executorch/actions/runs/8946028682/job/24575999986?pr=3507#step:14:465

2024-05-03T23:32:08.9914557Z restored HOME
pytorch-bot[bot] commented 2 weeks ago

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3507

Note: Links to docs will display an error until the docs builds have been completed.

:white_check_mark: You can merge normally! (2 Unrelated Failures)

As of commit a971cdd56a10bf30cae1410e78f6ca647132ef64 with merge base 3a2b2e8a3d5325d99edddc08decfbe9eaae55292 (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

* [Build Linux Wheels / pytorch/executorch / upload / manywheel-py3_8-cpu](https://hud.pytorch.org/pr/pytorch/executorch/3507#24576221522) ([gh](https://github.com/pytorch/executorch/actions/runs/8946028682/job/24576221522)) (detected as infra flaky with no log or failing log classifier) * [Build M1 Wheels / pytorch/executorch / upload / wheel-py3_8-cpu](https://hud.pytorch.org/pr/pytorch/executorch/3507#24576240865) ([gh](https://github.com/pytorch/executorch/actions/runs/8946028680/job/24576240865)) (detected as infra flaky with no log or failing log classifier)

This comment was automatically generated by Dr. CI and updates every 15 minutes.

facebook-github-bot commented 2 weeks ago

@dbort has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 weeks ago

@dbort merged this pull request in pytorch/executorch@d34f9f2ed13b9442cc339d4d8a44b97b1c9d2c5f.