xvik / gradle-use-python-plugin

Use python modules in gradle build

Home Page:https://xvik.github.io/gradle-use-python-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

checkPython silently fails after upgrading from gradle 7.4 to gradle 7.5

uthark opened this issue · comments

I tried to upgrade gradle to the new version and now plugin silently fails on checkPython task.

output on gradle 7.5:

#13 210.4 > Task :grpc-stub:language_safety:checkPython FAILED
#13 210.4 Using python 3.9.5 from /srv/.gradle/python (/srv/.gradle/python/bin/python)
#13 210.9 
#13 210.9 

output on gradle 7.4:

#13 192.4 > Task :grpc-stub:language_safety:checkPython
#13 192.4 Using python 3.9.5 from /srv/.gradle/python (/srv/.gradle/python/bin/python)
#13 192.4 

failed checkPython step causes to skip all pipInstall steps and python build consequently fails.

Sorry I was on vacations.
I tried to reproduce this on windows and ubuntu and it works (but I used different python versions: 3.9.4 and 3.10).
I'll try to look more, but not sure its reproducible.

I have an idea: most likely, you're running gradle on M1 mac and that's why I can't reproduce the problem on ubuntu.
I googled gradle problems on M1 and there are some reported issues, but nothing directly applicable for this case.

Another moment, have you tune gradle options like org.gradle.parallel ? One of M1 issues mention that disabling org.gradle.parallel fixes the problem. Maybe with the same options I will be able to reproduce it on ubuntu.

There is no free M1-based CI hosts, so I don't know how to verify this if it appears on M1 only

Hello! The issue is reproducible on Intel x64 too, it's not specific for m1.

Sorry, can't reproduce. I tried on windows and ubuntu. Used python 3.9.11, tried with pyenv managed python.
Can you please share plugin configuration? Maybe it would help.
Is there anything else in your project which might affect python execution (is it multi-module? if yes, which module use python (root or not), maybe something else).

Released version 3.0.0 with multiple concurrency fixes for multi-module projects. Maybe it would help.

I experienced the same issue. I was able to reproduce in a simple single module build. The only thing that "fixed" the issue for me was to set the python.scope = USER property in the mkdocs config closure.

Can you please reproduce it with --stacktrace option. If there is no exception, maybe --info would show anything.
Maybe you have anything specific in you environment: OS, specific python installation method, something about python plugin configuration. Can you reproduce it on gradle before 7.5 (or it appears only on 7.5)?

I want to resolve this but have no idea how to reproduce

The only thing that "fixed" the issue for me was to set the python.scope = USER property in the mkdocs config closure.

It should mean that the problem was caused by virtualenv. But, in any case, there should be an error pointing on exact failed python command. Version 3.0.0 (for both mkdocs and python plugins) should include complete python process output in case of execution failure

4.0.0 released with venv support by default, which should be already installed with python and so avoid virtualenv installation requirement (causing this issue).

Please re-open (or open new issue) if problem appear again