I have created ZOOKEEPER-2624 for this and have adapted the existing script to 
work with the git pull request. Currently, I have a separate script, but there 
is a lot of duplication, so it sounds very plausible to merge them.

The pull request for the jira has lots of meaningless commits because I was 
testing my changes. The current state is that I'm able to trigger and produce a 
report to the jira as we have with the jira QA. If we are to merge these 
changes in, then I'll close the pull request and resubmit the changes. Feel 
free to contribute to my changes and suggest a different way in the jira. We 
can definitely work together on this, I just want to have this working soon.

The script is bash, not python. It doesn't make it patch available mainly 
because if we make it patch available, then it will trigger the Jira QA, which 
will find no patch. It is a bit messy to trigger this second build, so I'm 
reluctant in doing it. I can see two options:

- Only do github pull requests, in which case "Patch Available" in our workflow 
means pull request available
- Somehow detect that there is a pull request and no trigger the Jira QA

-Flavio

> On 31 Oct 2016, at 17:18, Edward Ribeiro <edward.ribe...@gmail.com> wrote:
> 
> Hi Flavio,
> 
> Nice you have mentioned that 'cause I had written a small python script
> last Friday that gets the Github PR diff and post it on JIRA as an
> attachement. It's a git diff, not a svn one, but the jenkins processing
> queue is applying the patches to git now, right?
> 
> https://gist.github.com/eribeiro/be42ff9dcbc50ebd4b2779ef9f866cba
> 
> I guess we can incorporate parts of the script above in the QA queue or
> zk-merge-pr.py. It doesn't set up the issue as 'Patch Available', but it
> should be easy to do this. Also, it doesn't cancel the patch if the PR is
> closed, but I guess it can also be done (although I am afraid I don't know
> how to do this automatically).
> 
> The zk-merge-pr.py automatically resolve the jira issue once the PR is
> merged.
> 
> Edward
> 
> On Sat, Oct 29, 2016 at 1:23 PM, Flavio Junqueira <f...@apache.org> wrote:
> 
>> Another thing I forgot to mention and I noticed we are missing is to make
>> a jira patch available when a pull request is submitted and cancel the
>> patch if the pull request is closed without merging. I think there is a way
>> of doing it. It should also be possible to resolve the jira automatically
>> upon committing the pull request.
>> 
>> -Flavio
>> 
>>> On 28 Oct 2016, at 15:14, Flavio Junqueira <f...@apache.org> wrote:
>>> 
>>> Here is my progress so far. I managed to get the build to trigger with a
>> pull request and pull request changes:
>>> 
>>> https://builds.apache.org/view/PreCommit%20Builds/job/PreCom
>> mit-ZOOKEEPER-github-pr-build/
>>> 
>>> I had to hack into it a bit because our original pre-commit build is
>> really focused on getting patch files from jira, applying the patch, and
>> building it (check src/java/test/bin/test-patch.sh). I hardcoded the
>> build commands into the queue configuration, which works but makes it hard
>> for others without access to jenkins to contribute, so moving forward we
>> should script it.
>>> 
>>> There is clearly some polishing to be done, so please report back so
>> that we can try to fix it.
>>> 
>>> -Flavio
>>> 
>>>> On 27 Oct 2016, at 22:24, Flavio Junqueira <f...@apache.org> wrote:
>>>> 
>>>> Yeah, I tried to trigger the 761 manually and it didn't work. I need to
>> work on the manual trigger.
>>>> 
>>>> The issue with your PR 94 is likely to be a bug in the config that I
>> think I fixed now. I need to create a test PR to debug it.
>>>> 
>>>> One problem is that builds.apache.org <http://builds.apache.org/> is
>> super slow, so it is difficult to work on the configuration right now. I'll
>> work some more on my morning because it shouldn't be as busy.
>>>> 
>>>> -Flavio
>>>> 
>>>>> On 27 Oct 2016, at 22:19, Michael Han <h...@cloudera.com> wrote:
>>>>> 
>>>>> I saw the pre-commit build from the new bot (
>>>>> https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/1/)
>> for
>>>>> ZOOKEEPER-761. There are two issues:
>>>>> 
>>>>> * The test does not run, because "[exec] ZOOKEEPER-761 is not "Patch
>>>>> Available".  Exiting."
>>>>> * The build result was sent to dev list, but the result was not posted
>> on
>>>>> JIRA, as previous build bot did.
>>>>> 
>>>>> Still no sign of pre-commit build triggered by my PR94, btw.
>>>>> 
>>>>> On Thu, Oct 27, 2016 at 12:07 PM, Benjamin Reed <br...@apache.org>
>> wrote:
>>>>> 
>>>>>> i also pushed a new version for
>>>>>> https://issues.apache.org/jira/browse/ZOOKEEPER-761 although that one
>>>>>> might
>>>>>> be tricky since there are attached patches and a pr. should the pr
>> still be
>>>>>> qaed?
>>>>>> 
>>>>>> 
>>>>>> On Thu, Oct 27, 2016 at 12:04 PM, Michael Han <h...@cloudera.com>
>> wrote:
>>>>>> 
>>>>>>> Created PR94 to ZOOKEEPER-2014. It's been 2 hours, and no QA bot
>>>>>> activity.
>>>>>>> 
>>>>>>> On Thu, Oct 27, 2016 at 9:05 AM, Flavio Junqueira <f...@apache.org>
>>>>>> wrote:
>>>>>>> 
>>>>>>>> Ok, I have created this queue: PreCommit-ZOOKEEPER-github-pr-build.
>> I
>>>>>>>> have configured it and would kindly appreciate if anyone could
>> update a
>>>>>>> PR
>>>>>>>> to test it.
>>>>>>>> 
>>>>>>>> -Flavio
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> On 27 Oct 2016, at 16:57, Edward Ribeiro <edward.ribe...@gmail.com
>>> 
>>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>> Cool! Thanks for the heads up. :)
>>>>>>>>> 
>>>>>>>>> Cheers
>>>>>>>>> 
>>>>>>>>> Em 27 de out de 2016 1:56 PM, "Flavio Junqueira" <f...@apache.org>
>>>>>>>> escreveu:
>>>>>>>>> 
>>>>>>>>>> There is no need to create an INFRA jira, I'm taking care of it,
>>>>>> stay
>>>>>>>>>> tuned. In the meanwhile, please submit patches as usual through
>> jira
>>>>>>> to
>>>>>>>>>> trigger QA.
>>>>>>>>>> 
>>>>>>>>>> -Flavio
>>>>>>>>>> 
>>>>>>>>>>> On 27 Oct 2016, at 16:54, Edward Ribeiro <
>> edward.ribe...@gmail.com
>>>>>>> 
>>>>>>>>>> wrote:
>>>>>>>>>>> 
>>>>>>>>>>> Dear community,
>>>>>>>>>>> 
>>>>>>>>>>> As part of the github move, we are still lacking the plumbing
>> that
>>>>>>>> allows
>>>>>>>>>>> to run Jenkins CI tests, etc, on open Pull Requests. Please,
>> take a
>>>>>>>> look
>>>>>>>>>> at
>>>>>>>>>>> Kafka pending PR at Github to see what I am referring to.
>>>>>>>>>>> 
>>>>>>>>>>> Any committer could open an INFRA JIRA to address this?
>>>>>>>>>>> 
>>>>>>>>>>> Best regards,
>>>>>>>>>>> Eddie
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> Cheers
>>>>>>> Michael.
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Cheers
>>>>> Michael.
>>>> 
>>> 
>> 
>> 

Reply via email to