RepoSense icon indicating copy to clipboard operation
RepoSense copied to clipboard

GitHub Actions failing due to pip error

Open damithc opened this issue 1 year ago • 5 comments

The error:

Run pip install requests
error: externally-managed-environment
...

Example https://github.com/nus-cs2113-AY2425S1/ip-dashboard/actions/runs/11285488693/job/31388669590

damithc avatar Oct 11 '24 03:10 damithc

https://github.com/nus-cs2113-AY2425S1/tp-dashboard/actions is affected but https://github.com/nus-cs2103-AY2425S1/tp-dashboard/actions is not. hmm.... 🤔

damithc avatar Oct 11 '24 03:10 damithc

It looks like the breaking CI is using Ubuntu 24.04 instead of 22.04, which has configurations to prevent apt and pip from intefering with one another. Seems like the updated latest ubuntu runner isn't fully deployed.

We can probably pin the runner to ubuntu-22.04 instead of ubuntu-latest for now.

gok99 avatar Oct 11 '24 03:10 gok99

Beyond pinning to ubuntu-22.04 as a temporary fix, we can also look into adding a step to use venv to resolve the root issue which was introduced in PEP 668.

Can take reference from the multiple fixes that other projects have done, e.g., https://github.com/fcitx/mozc/commit/e8d25a2bee8ba5a7ac0c176cf8a8caef05663ddc#diff-1ee5360cc67f8ec7ed8a3ca75252c859e3acded65ab5e6d4688bcb8585b3e7efR29

sikai00 avatar Oct 11 '24 03:10 sikai00

@damithc I've pinned publish-RepoSense to ubuntu-22.04 for the time being - could you try merging it?

@sikai00 This would be good to do, together with adding ubuntu-24.04 to our CI runners for the RepoSense repo. Could you create issues for these?

gok99 avatar Oct 11 '24 04:10 gok99

@damithc I've pinned publish-RepoSense to ubuntu-22.04 for the time being - could you try merging it?

Yup, that worked. Thanks @gok99 for the quick fix.

damithc avatar Oct 11 '24 05:10 damithc