Accepting Contributed Code

Apache Airavata follows the core philosophy of the Apache Software Foundation, informally quoted as "Apache Way". To ensure the contributions have both legally complaint as well as merotically rewarded, following guidlines should be used.

  • Prefered contribution is by submitting patches through Airavata JIRA. The contributors while uploading the PATCH accept the donation of the copy right to ASF.
  • GitHUB pull requests can be accepted as a developer conveniance, but the individuals should have a ICLA on file that covers the contributions. When in question, ask on the dev list.
  • Committers accepting the pull requests needs to ensure appropriate credit is given. Merged committs should annotate to the individual who authored the commit. This is done by ensuing both name and email addresses are preserved.
  • Its better to preverse linear commit history and avoiding merged commits.

Note: This page describes steps for accepting previously contributed code and is relavent for Airavata committers. Contributors should refer to [Airavata Contributor Guide][airavata-contribute]

Contributed by a PATCH file

If the contributor has submitted a patch file on mailing list or JIRA (prefered), follow these steps to commit it.

  1. First update your local checkout with any remote changes (git pull). Observe the changes in the patch. Git apply -stat shows the stats about the changes in the patch. Example: git apply --stat AIRAVATA-XXXX.patch
  2. Test if the patch can be seamlessly applied. Example: git apply --check AIRAVATA-XXXX.patch
  3. Apply the patch. Use git am instead of git apply so signoff can be used to preserve the contributor as well as annotated by the committer accepting it. Example: git am --signoff < AIRAVATA-XXXX.patch
  4. Its a good practice to run the full build with test enabled to ensure the patch did not break the code.
  5. Finally push the patch to remote master/branch using git push.

Contributed by a GitHUB Pull request

Its preferable to clone a new copy into a temporary location (or maintain one for contributions). This ensures the contributors changes do not get tangled with your local development. The following steps list out a fresh checkout, adapt them to use your previous checkout.

  1. Clone the Airavata repo:git clone cd airavata (if the PR is for a branch, do a appropriate checkout)
  2. If the contributor has provided a github fork and did not create a pull request, you can directly fetch it and skip next step. If a pull request was created, skip this step and move to next. To fetch from fork use:git fetch branch-to-merge-from
  3. Configure Airavata GitHUB mirror
    • If you previously have not done add the github mirror: git remote add airavata-github
    • Configure to include pull requests: git config --local --add remote.airavata-github.fetch '+refs/pull/*/head:refs/remotes/airavata-github/pr/*'
    • Fetch all GitHub pull requests git fetch airavata-github
    • (optional) you can check out pull requests as a branch and test/review it. Example: git checkout airavata-github/pr/3. Github PR Local checkout lists this steps in detail.
  4. Pick the changes you want to merge from the pull requests: git cherry-pick hash-to-merge.
  5. Its a good practice to run the full build with test enabled to ensure the patch did not break the code.
  6. Finally push the patch to remote master/branch using git push.

iravata-contribute]: how-to-contribute-code.html