> On Feb 15, 2020, at 10:32 AM, Pierre Smits <pierresm...@apache.org> wrote:
> 
> Hi Allen, all,
> 
> Thank you for the prompt reply.
> 
> My apologies for the lengthy postings, and dragging this thread.

        Don't apologize! The questions are great and appreciated!  They point 
out short comings, either in the form of bugs or docs or missing features or 
... !

> I am still
> learning as I go along in my endeavour to reach something like what HBASE
> has ( https://issues.apache.org/jira/browse/HBASE-14498).

        You can't trust those HBase people. ;) 

> Based on my conclusion in a posting here earlier, I adjusted the startup
> command to
> 
> ~/dev/asf/yetus/precommit/src/main/shell/test-patch.sh
> --basedir=/Users/nl04748/dev/asf/ofbiz/ofbiz-framework --build-tool=gradle
> --dirty-workspace --docker --patch-dir=/Users/nl04748/dev/test/yetus
> --plugins=all --project=ofbiz
> https://github.com/apache/ofbiz-framework/pull/12


        Looks reasonable, although you should probably set --patch-dir to a 
directory you don't care about, since precommit really really really wants that 
dir to be scratch space.  Also, unless you have multiple build tools configured 
or doing something really funky in your repo, you probably don't need to set 
the build-tool.  precommit has gotten pretty good about guessing which tool to 
use.

> executable '' for 'gradle' does not exist.

        Hmm. That's... unexpected.

> So in docker mode, misses the gradle package. It seems to me that, when
> telling the script that the build tools to be used is gradle (parameter
> --buildtool
> =gradle) the generated image (yetus/ofbiz in this case) should have gradle
> installed. Correct?

        Correct.

> If so, the Dockerfile file in the test-patch-docker folder needs to be
> adjusted.
> I can imagine that a specific Gradle version may be required, so that may
> be an additional parameter, like --gradle-version=5.5.0 (in the case of
> OFBiz)

        Full disclosure: the gradle handling hasn't been well stressed in a 
very long time and even then was primarily built for my internal Kafka builds. 
I know gradle has changed quite a bit since it was written. There's a good 
chance you're going to hit some bugs.

        That said, something isn't right here, and it feels like a bug in the 
gradle handling.  IIRC, gradlew should be getting used to download gradle and 
not be required to be in the docker image.  

        *looks at code*

        This... doesn't feel correct at all. I'm sort of surprised if it worked 
outside of Docker!   But really, gradlew should be getting used to install 
gradle and answer the gradle version question.  It also tries to do a gradle -b 
bootstrap.gradle which is in no way guaranteed to work. 

        We definitely need a JIRA open to fix this mess. :(   I see git blame 
isn't going to ease my guilt. Haha.

        For the short term, you can either add gradle to the Dockerfile, start 
hacking pieces out of precommit/src/main/shell/test-patch.d/gradle.sh, or run 
with --build-tool=nobuild.  

        For the longer term, we need some code fixes.  They shouldn't be too 
painful, luckily.

Reply via email to