Skip to end of metadata
Go to start of metadata

Committer Responsibilities 

Committers are more than contributors. While it's important for committers to maintain standing by committing code, their key role is to build and foster a healthy and active community. This means that committers should 

  • Review PRs in a timely and reliable fashion
    • They should also help to actively whittle down the PR backlog (e.g. we currently have more than 100 PRs, many of which are over 3 months old)
  • Answering questions (i.e. on the dev list, in PRs, in Jiras, etc...)
  • Taking on core changes/bugs/feature requests
    • Some changes are important enough that a committer needs to ensure it gets done. This is especially the case if one one from the community is taking it on.
  • Improving processes and tooling
  • Refactoring code, etc...


Commit Policy

The following commit policy passed by a vote 8(binding FOR) to 0 against on May 27, 2016 on the dev list:

Commits need a +1 vote from a committer who is not the author

 

Furthermore, do not +1 or merge a PR that regresses linting (e.g. Landscape.io) or does not pass 4/6 travis tests.


Style Guide

Before merging a PR, please make sure that it is compliant with the points from the Contributors' Guide, in particular:

  • The PR title references a JIRA issue [AIRFLOW-XXX], where XXX is the JIRA number, and contains a JIRA link in the PR description
  • Any new files have an Apache License header
  • All commits follow the 7 rules of good Git commits and reference a JIRA issue if appropriate

Using the Airflow PR Tool

The Airflow PR Tool is a script that makes working with GitHub PRs easy. It has a number of functions for testing PRs locally, merging them to Airflow master, and closing related JIRA issues.

The most recent version of the PR Tool's documentation is available here.

Suggested Workflow

  1. Start by navigating to the airflow/dev directory and running the PR tool to print its help screen:

    # move to airflow directory
    cd /path/to/airflow
    dev/airflow-pr --help
  2. If you have not already done so, setup the git remotes

    dev/airflow-pr setup_git_remotes
  3. Check out a PR to your local machine for testing. The PR tool will pause after the PR is checked out; when resumed it will delete the PR and restore your original environment:

    # XXX is the GitHub PR number, for example 42
    dev/airflow-pr work_local XXX
  4. Merge a PR to Airflow master. This command will also prompt you to close related JIRA issues:

    # XXX is the GitHub PR number, for example 42
    dev/airflow-pr merge XXX

Merging PRs by Hand

Overview

You should no longer need to merge anything by hand. The tool above is awesome and does a lot more than the steps below. If for some reason, that tool get broken in the future, you will need to merge by hand as described below.  

Details

Step 1: Clone the Apache Airflow Git Repo

git clone git@github.com:apache/incubator-airflow.git

Step 2: Add a remote for the github Work-in-progress 


Step 3: Display Remotes

Sid-As-MacBook-Pro:airflow siddharth$ git remote -v
apache https://git-wip-us.apache.org/repos/asf/incubator-airflow.git (fetch)
apache https://git-wip-us.apache.org/repos/asf/incubator-airflow.git (push)
origin git@github.com:apache/incubator-airflow.git (fetch)
origin git@github.com:apache/incubator-airflow.git (push)
 
Step 4: Pick a PR

Step 5: Make sure Local Master is up-to-date
git checkout master
git pull -r
 
Step 6: Fetch the PR into a branch named after the PR number (e.g. 1481)

git fetch origin pull/1481/head:1481


Step 7: Merge that branch into your current master

git merge 1481

 

Make sure that the PR to be merged has been squashed, and the comment of the commit starts with the AIRFLOW JIRA number (e.g. `[AIRFLOW-80] Move example_twitter dag to contrib/example_dags as it requires hive`). Also, ensure that the JIRA references the PR in the "external_issue_url" so that the PR gets closed automatically when you merge.

Step 8: Run relevant tests

Step 9: Push local master to apache master
git push apache master
(this will get mirrored to github master)

Step 10: What happens next?
  • Sub-Step A: You will noticed that the ASFGIT bot will automatically close your PR as merged
  • Sub-Step B: You will see 2 travis entries on the PR update: 
    • one for the original PR (a.k.a. continuous-integration/travis-ci/pr)
    • another for the newly-pushed commit to master (a.k.a. continuous-integration/travis-ci/push)
  • Sub-Step C: The ASGGIT bot will comment on the JIRA with the git commit id
  • Sub-Step D: Close the JIRA

Note : I maintain my fork in a different work space – IMHO more than 2 remotes can lead to silly mistakes.

To close a PR without merging it use the following command:

git commit --allow-empty -m "closes apache/incubator-airflow#3399 *Obsolete PR*"
git push apache master

where "3399" is the id of the PR and *Obsolete PR* is the reason why the PR is been closed without being merged. ASFGIT bot will automatically close the PR.



Adding New Committers/PMC Members to the Airflow Incubation Status Page

The goal of these instructions is to update http://incubator.apache.org/projects/airflow.html


  1. Check out the svn repo at https://svn.apache.org/repos/asf/incubator/public/trunk/content/projects
  2. Update {local_working_dir}/content/projects/airflow.xml
  3. svn commit -m "Adding xxx as committer/pmc member to apache airflow"
  4. Publish to the incubator website using https://cms.apache.org/incubator/publish
  5. Verify your change on http://incubator.apache.org/projects/airflow.html

The Incubator website is no longer managed via CMS. The website is built on Jenkins and the website builds daily for updates. Hence, you would be able to view the change at most by the next day. For more information visit Link 1 | Link 2 | Link 3


  • No labels

3 Comments

  1. A PR can be closed without committing it like so: https://mahout.apache.org/developers/github.html#closing-a-pr-without-committing-for-committers

    Here's an example that closed https://github.com/apache/incubator-airflow/pull/2440 :

    git commit --allow-empty -m "Closes apache/incubator-airflow#2440 *Already Merged*"

  2. From Bolke de Bruin:

    if you install https://github.com/github/hub you can pass it a PR URL as well making it really easy
    so basically git checkout master, and git am https://github.com/apache/incubator-airflow/pull/1485
    this will apply the contributor's commits to your master, retaining the author information
    then you can run git commit --amend to change it (reword the commit, add cosmetic fixes, etc.)
    and if you do that the author full remain the contributor, and you'll be added as a committer

  3. Useful guide for adding new committers/PMC members:

    https://reference.apache.org/pmc/acreq

    Whimsy's link for adding new users is here:

    https://whimsy.apache.org/roster/ppmc/airflow