25

Apache贡献|一行代码成为Apache Contributor

 4 years ago
source link: http://mp.weixin.qq.com/s?__biz=MzU5OTQ1MDEzMA%3D%3D&%3Bmid=2247487273&%3Bidx=1&%3Bsn=e62c1241d6da307015810bf0de1648a9
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

以Apache Hudi为例,讲解如何通过一行代码成为Apache顶级项目的Contributor。

1. 准备

1.1 Github准备

1) 准备 github 账号,通过https://github.com/join注册,记住注册的邮箱和用户名。

2) Fork Apache Hudi项目(https://github.com/apache/incubator-hudi)至自己(TheApacheHudi)的远程仓库

640?wx_fmt=png

3) 将资源远程仓库clone至本地

640?wx_fmt=png

4) 进入到incubator-hudi目录后添加Apache Hudi为 upstream

5) 使用 git remote-v 查看项目状态,如下表示自己(TheApacheHudi)远程仓库为 origin ,而Apache远程仓库为 upstream

640?wx_fmt=png

6) 使用 git config user.name xxx;git config user.email xxx 配置用户名和邮箱,注意用户名和邮箱需要使用注册Github使用的用户名和邮箱,这样后续才能正常显示 Contributor 标志

640?wx_fmt=png

1.2 邮箱订阅

为方便参与社区讨论,请务必订阅[email protected]开发者邮件列表,订阅方法很简单,只需向[email protected]发送一封空邮件,然后马上会收到[email protected]回复的一封邮件,然后对该邮件再点击最下方的回复按钮(以Google邮箱为例)进行一次回复即可(如回复comfirm)

640?wx_fmt=png

回复完之后会收到一封正式的欢迎邮件,表示已经订阅完成,后续便可参与社区的讨论

640?wx_fmt=png

1.3 JIRA准备

几乎所有Apache顶级项目都是通过JIRA来管理issue,所以注册JIRA账号必不可少。

1) 准备jira账号,通过https://issues.apache.org/jira/secure/Signup!default.jspa注册,请记住JIRA ID,已有账号可直接登录。

2) 查看HUDI所有issue(https://issues.apache.org/jira/projects/HUDI/issues)。

3) 若有合适的issue,可点击右侧的Assign to me(分配给我),对于较为复杂的issue,可在issue下评论讨论实现思路,确保达成一致后再开始写代码。

640?wx_fmt=png

4) 若登录后发现无 Assignto me(分配给我) 按钮,那么需要向[email protected]邮箱发送一封JIRA权限开通申请邮件,可参照如下模版发送。

Hi,

I want to contribute to Apache Hudi. Would you please give me the contributor permission? My JIRA ID is xxx.

当项目PMC看到邮件后,会给你开通相应权限(由于时差原因,回复可能有些延迟)。

1.4 Confluence准备

同样,Apache顶级项目会通过Confluence来管理一些改进计划,如Hudi的RFC,当你想要对Hudi添加一些大的特性时,需要在Confluence创建RFC(https://cwiki.apache.org/confluence/display/HUDI/Apache+Hudi),若无权限,也需要向[email protected]邮箱发送一封申请邮件,与申请JIRA权限类似,带上自己的Confluence ID,会有PMC给你开通权限。几乎所有问题都可向[email protected]邮箱求助。

2. 提交代码

对于一些初次参与社区的开发者而言,一种较好的上手方式就是 fix typo ,即修复单词错误,比如,如下的单词错误

640?wx_fmt=png

1) 基于master分支checkout一个新分支

640?wx_fmt=png

2) 使用 git add.git commit-m"[MINOR] fix typo"git push origin typofix:typofix 推至自己远端仓库

640?wx_fmt=png

3) 进入Apache/Hudi github页面,会出现 Compare&pull request 按钮

640?wx_fmt=png

4) 点击 Compare&pull request ,补充PR描述信息后,点击 Createpull request 即可

640?wx_fmt=png

5) 这样便完成提交PR的过程,后续等待committer帮忙review代码、根据意见修改代码和合并PR,当合并后,恭喜你,正式成为Apache顶级项目的contributor

640?wx_fmt=png

当然上述 typo fix 可用作熟悉整体流程,一旦熟悉后,可尝试进行一些bug fix或开发新的feature、回答邮件列表问题、参与邮件列表讨论等,都会有助于更快速成为committer。

对于Apache Hudi项目,现在还有些非常简单的任务可供新手上手,如https://issues.apache.org/jira/browse/HUDI-233(使用SLF4J重做项目日志);https://issues.apache.org/jira/browse/HUDI-385(scala checkstyle处理),欢迎想要参与社区的开发者认领issue,成为Apache的contributor。

其他Apache顶级项目(如Flink/Spark/HBase)的社区参与与上述步骤类似。

2. 总结

想成为Apache的contributor或熟悉PR提交流程,一种简单参考样例是通过 typo fix 上手,熟悉流程后可做更多事情,这样可早日成为Apache committer。

640?wx_fmt=png

640?wx_fmt=jpeg


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK