You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by ke...@apache.org on 2013/12/05 20:58:21 UTC

[9/9] git commit: Document ASF review process and tooling.

Document ASF review process and tooling.


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/d51fecab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/d51fecab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/d51fecab

Branch: refs/heads/master
Commit: d51fecab9eb75a92e1b774fff31f746b55111c82
Parents: b4da3c3
Author: Kevin Sweeney <ke...@apache.org>
Authored: Thu Dec 5 11:54:13 2013 -0800
Committer: Kevin Sweeney <ke...@apache.org>
Committed: Thu Dec 5 11:54:13 2013 -0800

----------------------------------------------------------------------
 .gitignore               |  3 ++-
 .reviewboardrc           |  3 +++
 build-support/virtualenv | 25 ++++++++++++++++++++++++
 docs/contributing.md     | 45 +++++++++++++++++++++++++++++++++++++++++++
 pants                    | 27 +++-----------------------
 rbt                      | 12 ++++++++++++
 6 files changed, 90 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d51fecab/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 3731eeb..bf8c4e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,9 +6,10 @@
 .coverage
 .gradle/
 .pants.*
-.reviewboardrc
 .vagrant/
 build/
+build-support/rbtools/
+build-support/virtualenv-*
 dist/
 gradle-app.setting
 out/

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d51fecab/.reviewboardrc
----------------------------------------------------------------------
diff --git a/.reviewboardrc b/.reviewboardrc
new file mode 100644
index 0000000..a66e6fd
--- /dev/null
+++ b/.reviewboardrc
@@ -0,0 +1,3 @@
+REPOSITORY = "aurora"
+REVIEWBOARD_URL = "https://reviews.apache.org"
+TARGET_GROUPS = "Aurora"

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d51fecab/build-support/virtualenv
----------------------------------------------------------------------
diff --git a/build-support/virtualenv b/build-support/virtualenv
new file mode 100755
index 0000000..b44991a
--- /dev/null
+++ b/build-support/virtualenv
@@ -0,0 +1,25 @@
+#!/bin/sh -ex
+# Wrapper for self-bootstrapping virtualenv
+VIRTUALENV_VERSION=1.10.1
+
+if which python2.7 >/dev/null; then
+  PY=`which python2.7`
+elif which python2.6 >/dev/null; then
+  PY=`which python2.6`
+else
+  echo 'No python interpreter found on the path.  Python will not work!' 1>&2
+  exit 1
+fi
+
+echo "Using $PY" >&2
+
+if ! [ -f "build-support/virtualenv-$VIRTUALENV_VERSION/BOOTSTRAPPED" ]; then
+  pushd build-support
+  curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-$VIRTUALENV_VERSION.tar.gz
+  tar zxvf virtualenv-$VIRTUALENV_VERSION.tar.gz
+  # TODO(ksweeney): Checksum
+  touch virtualenv-$VIRTUALENV_VERSION/BOOTSTRAPPED  # 2PC
+  popd
+fi
+
+exec "$PY" build-support/virtualenv-$VIRTUALENV_VERSION/virtualenv.py "$@"

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d51fecab/docs/contributing.md
----------------------------------------------------------------------
diff --git a/docs/contributing.md b/docs/contributing.md
new file mode 100644
index 0000000..cac4429
--- /dev/null
+++ b/docs/contributing.md
@@ -0,0 +1,45 @@
+Getting your ReviewBoard Account
+--------------------------------
+Go to https://reviews.apache.org and create an account.
+
+Setting up your ReviewBoard Environment
+---------------------------------------
+Run `./rbt status`. The first time this runs it will bootstrap and you will be asked to login.
+Subsequent runs will cache your login credentials.
+
+Submitting a Patch for Review
+-----------------------------
+Post a review with `rbt`, fill out the fields in your browser and hit Publish.
+
+    ./rbt post -o -g
+
+Updating an Existing Review
+---------------------------
+Incorporate review feedback, make some more commits, update your existing review, fill out the
+fields in your browser and hit Publish.
+
+    ./rbt post -o -r <RB_ID>
+
+Merging Your Own Review (Committers)
+------------------------------------
+Once you have shipits from the right committers, merge your changes in a single squash commit
+and mark the review as submitted. The typical workflow is
+
+    git checkout master
+    git pull origin master
+    git merge --squash my_feature_branch
+    git commit
+    git show master  # Verify everything looks sane
+    git push origin master
+    ./rbt close <RB_ID>
+    git branch -d my_feature_branch
+
+Merging Someone Else's Review
+-----------------------------
+Sometimes you'll need to merge someone else's RB. The typical workflow for this is
+
+    git checkout master
+    git pull origin master
+    ./rbt patch -c <RB_ID>
+    git show master  # Verify everything looks sane, author is correct
+    git push origin master

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d51fecab/pants
----------------------------------------------------------------------
diff --git a/pants b/pants
index c0d0cab..2772c64 100755
--- a/pants
+++ b/pants
@@ -2,7 +2,6 @@
 
 PANTS_ROOT=$(dirname "$0")
 PANTS_VERSION=$(cat "$PANTS_ROOT/.pantsversion")
-VIRTUALENV_VERSION=1.10.1
 
 if [[ -e "$PANTS_ROOT/pants.pex" ]]; then
   cat <<EOF | PANTS_ROOT="$PANTS_ROOT" PANTS_VERSION=$PANTS_VERSION python
@@ -31,34 +30,14 @@ fi
 
 PANTS_TEMP=$(mktemp -d /tmp/pants.XXXXXX)
 
-if which python2.7 >/dev/null; then
-  PY=$(which python2.7)
-elif which python2.6 >/dev/null; then
-  PY=$(which python2.6)
-elif which python3 >/dev/null; then
-  PY=$(which python3)
-else
-  echo 'No python interpreter found on the path.  Python will not work!' 1>&2
-  exit 1
-fi
-
-echo 'Using '$PY 1>&2
-
+./build-support/virtualenv "$PANTS_TEMP/tcp"
 pushd "$PANTS_TEMP"
 
-curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-$VIRTUALENV_VERSION.tar.gz
-tar -zxf virtualenv-$VIRTUALENV_VERSION.tar.gz
-$PY virtualenv-$VIRTUALENV_VERSION/virtualenv.py tcp
 source tcp/bin/activate
 
 pip install twitter.common.python==0.2.0
 
-cat <<EOF | \
-  PYTHON_VERBOSE=1 \
-  PEX_VERBOSE=1 \
-  PANTS_VERSION=$PANTS_VERSION python
-import os
-
+PYTHON_VERBOSE=1 PEX_VERBOSE=1 python <<EOF
 from twitter.common.python.fetcher import Fetcher, PyPIFetcher
 from twitter.common.python.http import Crawler
 from twitter.common.python.obtainer import Obtainer
@@ -68,7 +47,7 @@ from twitter.common.python.translator import Translator
 
 pb = PEXBuilder()
 resolver = Resolver(crawler=Crawler(), fetchers=[PyPIFetcher()])
-req = 'twitter.pants==' + os.environ['PANTS_VERSION']
+req = 'twitter.pants==$PANTS_VERSION'
 pb.add_requirement(req)
 for dist in resolver.resolve(req):
   pb.add_distribution(dist)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d51fecab/rbt
----------------------------------------------------------------------
diff --git a/rbt b/rbt
new file mode 100755
index 0000000..8f01ff9
--- /dev/null
+++ b/rbt
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+# Wrapper script for self-bootstrapping rbt.
+# TODO(ksweeney): Use ./pants py here instead of virtualenv.
+if ! [ -f build-support/rbtools/BOOTSTRAPPED ]; then
+  echo Bootstrapping rbtools
+  ./build-support/virtualenv build-support/rbtools
+  source build-support/rbtools/bin/activate
+  pip install RBTools==0.5
+  touch build-support/rbtools/BOOTSTRAPPED
+fi
+source build-support/rbtools/bin/activate
+exec rbt "$@"