-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46465/
-----------------------------------------------------------

Review request for samza.


Repository: samza


Description
-------

The current process for code reviews and checkĀ­ins in Samza involves multiple 
manual steps
and is cumbersome. This change is to move Samza to rely on pull requests.

Here's a writeup that explains the motivation for this design:
https://issues.apache.org/jira/secure/attachment/12799869/MovingSamzatoPullRequests.pdf

This change also adds the ./samza_merge_pr.py tool 
-This tool will automate all of git / jira interactions and manual steps that 
we have currently in the committer workflow.) 
-This is also a step towards standardizing commit messages in the Samza project 
(so that they are generated consistently by the tool)


Kafka and Spark have similar tools, and we've adapted those:
https://github.com/apache/kafka/blob/trunk/kafka-merge-pr.py
https://github.com/apache/spark/blob/master/dev/merge_spark_pr.py


Diffs
-----

  samza_merge_pr.py PRE-CREATION 

Diff: https://reviews.apache.org/r/46465/diff/


Testing
-------

Tested with running the tool on a test repository. Here's what a sample run 
looks like:

?  samza-clone git:(master) ./samza_merge_pr.py
git rev-parse --abbrev-ref HEAD
Which pull request would you like to merge? (e.g. 34): 2
Commit title [Fix1]:

=== Pull Request #2 ===
PR title        Fix1
Commit title    Fix1
Source          vjagadish1989/fix1
Target          master
URL             https://api.github.com/repos/vjagadish/samza-clone/pulls/2

Proceed with merging pull request #2? (y/n): y
git fetch apache-github pull/2/head:PR_TOOL_MERGE_PR_2
>From https://github.com/vjagadish/samza-clone
 * [new ref]         refs/pull/2/head -> PR_TOOL_MERGE_PR_2
git fetch apache-github master:PR_TOOL_MERGE_PR_2_MASTER
>From https://github.com/vjagadish/samza-clone
 * [new branch]      master     -> PR_TOOL_MERGE_PR_2_MASTER
git checkout PR_TOOL_MERGE_PR_2_MASTER
Switched to branch 'PR_TOOL_MERGE_PR_2_MASTER'
['git', 'merge', 'PR_TOOL_MERGE_PR_2', '--squash']
Automatic merge went well; stopped before committing as requested
['git', 'log', 'HEAD..PR_TOOL_MERGE_PR_2', '--pretty=format:%an <%ae>']
Enter primary author in the format of "name <email>" [vjagadish1989 
<jagadish1...@gmail.com>]:
Enter reviewers in the format of "name1 <email1>, name2 <email2>":
['git', 'log', 'HEAD..PR_TOOL_MERGE_PR_2', '--pretty=format:%h [%an] %s']
List pull request commits in squashed commit message? (y/n): y
['git', 'commit', '--author="vjagadish1989 <jagadish1...@gmail.com>"', '-m', 
u'Fix1', '-m', u'', '-m', 'Author: vjagadish1989 
<jagadish1...@gmail.com>\nAuthor: Jagadish Venkatraman 
<jvenk...@linkedin.com>', '-m', u'Closes #2 from vjagadish1989/fix1 and 
squashes the following commits:', '-m', '8451b71 [vjagadish1989] bo\n68f989b 
[vjagadish1989] fix\nf2ae42c [vjagadish1989] .\n58aa24c [vjagadish1989] more 
changes\n3c4701e [Jagadish Venkatraman] improve docs']

Merge complete (local ref PR_TOOL_MERGE_PR_2_MASTER). Push to apache-github? 
(y/n): y
git push apache-github PR_TOOL_MERGE_PR_2_MASTER:master
Counting objects: 14, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 518 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
To https://github.com/vjagadish/samza-clone.git
   0ad9df7..0194dcf  PR_TOOL_MERGE_PR_2_MASTER -> master
git rev-parse PR_TOOL_MERGE_PR_2_MASTER
git rev-parse --abbrev-ref HEAD
Restoring head pointer to master
git checkout master
Switched to branch 'master'
git branch
Deleting local branch PR_TOOL_MERGE_PR_1
git branch -D PR_TOOL_MERGE_PR_1
Deleting local branch PR_TOOL_MERGE_PR_2
git branch -D PR_TOOL_MERGE_PR_2
Deleting local branch PR_TOOL_MERGE_PR_2_MASTER
git branch -D PR_TOOL_MERGE_PR_2_MASTER
Pull request #2 merged!
Merge hash: 0194dcf0

Would you like to pick 0194dcf0 into another branch? (y/n): n

Would you like to update an associated JIRA? (y/n): y
Enter a JIRA id []: SAMZA-934
=== JIRA SAMZA-934 ===
summary         Race condition in Kafka System Producer
assignee        Navina Ramesh
status          Open
url             https://issues.apache.org/jira/browse/SAMZA-934


Thanks,

Jagadish Venkatraman

Reply via email to