blob: 9505ebe2f4a5d849ae8d9fcbadb6025e4f05d7be [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="favicon.ico">
<title>Submitting Changes</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<!-- Custom styles for this template -->
<link href="css/theme.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
</head>
<div class="container theme-showcase" role="main">
<div class="masthead">
<p class="lead">
<a href="index.html">
<img src="img/asterixdb_tm.png" style="height:75px; width:auto; vertical-align:bottom; margin-top:10px;"/>
</a>
</p>
</div>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Overview</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="download.html">Download</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Documentation<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li class="dropdown-header">Stable release</li>
<li><a href="docs/0.9.6/index.html">Documentation for 0.9.6<i class="fa fa-external-link fa-sm"></i></a></li>
<li class="divider"></li>
<li class="dropdown-header">Snapshot release</li>
<li><a href="https://ci.apache.org/projects/asterixdb/index.html">Documentation for 0.9.6-SNAPSHOT <i class="fa fa-external-link fa-sm"></i></a></li>
<li class="divider"></li>
<li class="dropdown-header">Tutorial for SQL Users</li>
<li><a href="files/SQL_Book.pdf">Don Chamberlin's SQL++ for SQL Users<i class="fa fa-external-link fa-sm"></i></a></li>
</ul>
</li>
<li><a href="about.html">About</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Community<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="community.html">Mailing Lists</a></li>
<li><a href="community.html#irc">IRC</a></li>
<li><a href="community.html#asterixdb-team">Team</a></li>
<li><a href="https://issues.apache.org/jira/browse/ASTERIXDB">Issue Tracker</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Development<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li class="dropdown-header">For New Contributors</li>
<li><a href="dev-setup.html">Development Setup</a></li>
<li class="divider"></li>
<li class="dropdown-header">For Committers</li>
<li><a href="pushing.html">Pushing changes</a></li>
<li><a href="site.html">Editing this site</a></li>
<li class="dropdown-header">Extensions</li>
<li><a href="extension.html">Extending AsterixDB</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"
style="padding-right: 30px">
<img src="img/feather.png" style="height:20px"/>Apache Software Foundation<span class="caret"/>
</a>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li><a href="http://www.apache.org/"><b>ASF Homepage</b></a></li>
<li><a href="http://www.apache.org/licenses/">License</a></li>
<li><a href="http://www.apache.org/foundation/sponsorship.html">Donate</a></li>
<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
<li><a href="http://www.apache.org/security/">Security</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="row">
<div class="col-md-8 col-centered">
<h2>Submitting Changes</h2>
<ul id="markdown-toc">
<li><a href="#submitting-patches-in-gerrit" id="markdown-toc-submitting-patches-in-gerrit">Submitting patches in Gerrit</a></li>
<li><a href="#pushing-merged-patches-from-gerrit-to-asf-git" id="markdown-toc-pushing-merged-patches-from-gerrit-to-asf-git">Pushing merged patches from Gerrit to ASF git</a></li>
</ul>
<hr />
<h3 id="submitting-patches-in-gerrit">Submitting patches in Gerrit</h3>
<p>Once a patch set is <code>+2 Code Review</code> in Gerrit, as well as <code>+1 Verified</code>, it can be submitted by a committer.
In the simplest case, this simply means for someone who is authorized (any Apache committer) to click the ‘Submit Patchset …’ button in the Gerrit web interface. However there is one case right now where care must be exercised in submitting a patch.</p>
<h4 id="patches-which-span-hyracks-and-asterixdb">Patches which span Hyracks and AsterixDB</h4>
<p>These patches require special care to submit. Any AsterixDB patch that requires a topic in Gerrit to verify is of this type. In general this is the process:</p>
<ol>
<li>Ensure that both patches are based on the current HEAD of master (there should be no ‘Rebase Change’ button). This will require reviewers to re-apply their +2, because it changes the content of the patch.</li>
<li>Submit the Hyracks patch.</li>
<li>If all went well, submit the AsterixDB patch.</li>
</ol>
<p><strong>IMPORTANT</strong>: Do <em>not</em> attempt to merge a patch that needs changes in Hyracks and AsterixDB while it needs rebasing. If the patch to Hyracks succeeds with a clean rebase, but the AsterixDB change requires a manual merge, you will leave master in a broken state!</p>
<h3 id="pushing-merged-patches-from-gerrit-to-asf-git">Pushing merged patches from Gerrit to ASF git</h3>
<p>Once a change is submitted and merged in Gerrit, the job is only partially done. The patch is committed in Gerrit’s local repository, but it is not present in the ASF git repository. This step must be done manually, preferably by the author of the patch (if they are a committer), or by one of the reviewers (if the patch is authored by a non-committer). This is simply a matter of fetching Gerrit’s master branch, and then pushing those changes to the ASF git repo. The git-asf script automates and simplifies this process.</p>
<h4 id="prerequisites">Prerequisites</h4>
<p>Before we begin, some prerequisites/notes:</p>
<ul>
<li>
<p>You should have git-gerrit and git-asf installed (available <a href="http://github.com/ceejatec/git-gerrit">here</a>) and set up properly.</p>
</li>
<li>
<p>We need the SHA1 hash of the commit we want to push to ASF. This is visible in the Gerrit Web UI as a comment when a change is merged (“Change has been successfully cherry-picked as …”).</p>
</li>
<li>
<p>You should have the credentials for pushing to the ASF repository set up in a .netrc file or stored in git. See <a href="https://git-wip-us.apache.org/#committers-getting-started">here</a> for more details on setting up git with your Apache credentials.</p>
</li>
</ul>
<h4 id="pushing-the-changes">Pushing the change(s)</h4>
<p>Once the above is fulfilled, we can begin. Let <code>$SHA1</code> be the actual SHA1 hash of the commit we want to transmit from Gerrit to the ASF repo.</p>
<ol>
<li><code>git asf commit $SHA1</code></li>
</ol>
<p>That’s all there is to it! If the patch spanned both Hyracks and AsterixDB, be sure to perform this process in both repositories.</p>
</div>
</div>
<hr/>
<footer>
<div class="row">
<div class="col-md-9 col-centered text-center">
<p/>
<p>&copy; Copyright 2016 The Apache Software foundation. All Rights Reserved. </p>
<p>Apache AsterixDB, the Apache AsterixDB logo, Apache, and the Apache feather logo are trademarks of the
Apache Software Foundation</p>
</div>
</div>
</footer>
</div> <!-- /container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>