networknt / light-bot

A microservice based DevOps agent that handles multiple repositories and dependencies
Apache License 2.0
7 stars 3 forks source link

small bot improvement for running maven builds #80

Closed yibogithub closed 3 years ago

yibogithub commented 5 years ago

this PR has three things to offer

1)A new "FasterRollingCommandExecutor" which keeps the logs rolling, making a long maven build more responsive to a developer. 2)An introduction of a simpler to use Process control tool "zt-exec" under the Apache 2.0 license. I have personally used it in the past with good experience; please raise any known concern about it. 3)An introduction of a "parallel" key for a build task; this makes better use of multi core dev computers running multiple build processes. That said, developer have to group independent maven build together.

For 3) I avoid making change directly into DevelopBuildTask because I want to play safe with the open-closed principle. Instead, I recreated an extension with some copy-pasted duplication. Let me know if directly making changes is preferable (clean code over safety).

stevehu commented 5 years ago

These are all good ideas. Let me know when the PR can be merged.

ddobrin commented 5 years ago

It'll be tested by tomorrow. Configuration needs to be looked at as well

stevehu commented 3 years ago

@yibogithub I have merged the PR to the master. During the testing, I found the following error on the console and wondering if you know how to fix it. It doesn't impact the functionality but annoying.

    11:46:34.662 [Thread-4]   ERROR o.z.exec.stream.InputStreamPumper run - Got exception while reading/writing the stream
    java.lang.InterruptedException: sleep interrupted
        at java.lang.Thread.sleep(Native Method)
        at org.zeroturnaround.exec.stream.InputStreamPumper.run(InputStreamPumper.java:89)
        at java.lang.Thread.run(Thread.java:748)