Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add http config to connect gerrit

...

To set up Gerrit as a git remote for your Impala repository, do the following:


Code Block
cd ${IMPALA_HOME}
git remote add asf-gerrit ssh://<your-github-username>@gerrit.cloudera.org:29418/Impala-ASF

If using HTTP to connect to Gerrit, use the following command to add the Gerrit remote is also works:

Code Block
git remote add asf-gerrit http://<your-github-username>@gerrit.cloudera

...

.org:8080/a/Impala-ASF

Pay attention, when using HTTP to push/pull code, we need to input username/password. Do not use login account directly, we should get username/password from "Settings→HTTP Password" instead.

Sending a patch for review

...

Neither of these jobs write a comment or Verified bit or attempt to Submit a Gerrit patch set. A submitter ought to monitor his or her job as it progresses. A submitter is encouraged to manually link a successful job in a Gerrit review comment as demonstration of success. When testing a draft, the "Impala Public Jenkins" user needs to be added to the change, so that Jenkins can access it.

Verifying and submitting a patch (Impala committers only)

...

If your commit touches files both in and out of the docs/ folder, run https://jenkins.impala.io/job/gerrit-verify-dryrun/build?delay=0sec first, following the directions above. Once it succeeds, run https://jenkins.impala.io/job/gerrit-docs-submit/build?delay=0sec. 


Tip

Verifying and cherry-picking a patch can be simplified with a bookmarklet. Here is how to do that in Chrome:

  1. Go to any webpage you like, say http://example.com.

  2. Press control-d.

  3. In the Folder drop down, select "Bookmarks Bar".

  4. If your bookmarks bar is not visible, press control-shift-b.

  5. If your new bookmark is not visible, click on the ">>" on the right-hand side of the bookmarks bar, then drag it to the visible part of the bar.

  6. Right-click on it and select "Edit".

  7. Change the name to "Jenkins code pre-commit" and the URL to javascript:location.href='https://jenkins.impala.io/job/gerrit-verify-dryrun/parambuild/?PATCH_URL='+encodeURIComponent(document.location.href);

  8. When you are ready to have Jenkins +Verify and cherry-pick a patch, go to the patch, ala https://gerrit.cloudera.org/#/c/5664/, then click your bookmarklet. 

  9. If you get an error then make sure you are signed in to jenkins.impala.io
  10. Press Build.

By changing the javascript URL, you can also make a bookmarklet for the docs Jenkins job.

When Jenkins has completed successfully, your change is in the master gerrit repo, but not yet in the official Apache repo. Apache does not allow non-sentient robots like Jenkins to submit patches. To get your patch to the official Apache repo, a committer needs to push the commit to the Apache git repository, by running:

...


Code Block
bin/push_to_asf.py

push_to_asf.py checks the latest commits in gerrit and checks if they are in the Apache git repo. If some are not in the Apache git repo yet, it will ask you if you want to update the Apache git repo with the missing commits found in the Gerrit repo. It does not check what your local state is at all. It only compares remote Gerrit with the remote Apache repo. Keep in mind that if you are a committer, it will allow you to commit any change authored by anyone that has passed the Jenkins cherry-picking described above.

...