mtkennerly / poetry-dynamic-versioning

Plugin for Poetry to enable dynamic versioning based on VCS tags
MIT License
588 stars 36 forks source link

Getting PermissionError when using poetry-dynamic-versioning in GitHub CI #166

Closed lebrice closed 4 months ago

lebrice commented 4 months ago

Hello there @mtkennerly, thanks for developing this plugin!

I'm having a bit of trouble getting the poetry-dynamic-versioning plugin to work in the CI of a repo I'm working on.

It's working fine locally, but I'm having weird permission errors when running on the GitHub CI: https://github.com/mila-iqia/milatools/actions/runs/7874084850/job/21482871835#step:5:101

Here's the workflow file, by the way: https://github.com/mila-iqia/milatools/actions/runs/7874084850/workflow

I searched through some of the closed issues on this repo but didn't find anything that matched. Any help would be greatly appreciated :)

lebrice commented 4 months ago

I think I managed to solve the issue by moving the setup-python block before the pip install poetry block. In retrospec this does make sense, seeing as Poetry was installed with the system python instead of the desired python version!

lebrice commented 4 months ago

Although now that I think about it, shouldn't poetry have created a virtualenv for the right Python version? Perhaps this is a bug after all?

mtkennerly commented 4 months ago

Hi! I don't think this issue is specific to this plugin. You could try reporting it to the Poetry team, although they might just recommend un-/reinstalling Poetry after changing Python versions.