Skip to content

Commit

Permalink
[docs] Favor pull requests instead of review board
Browse files Browse the repository at this point in the history
  • Loading branch information
romainr committed Dec 24, 2020
1 parent 18c1e21 commit 3c7918f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 49 deletions.
10 changes: 2 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,9 @@ Have a look at [how to quick build](https://docs.gethue.com/developer/developmen

## Reviews

It is flexible:
It is flexible but Github Pull request are handy.

* **Github Pull request**
Preferred way. Just post the [pull request](https://github.com/cloudera/hue/pulls) and reviewers will start from there. The CI will run a basic set of tests for you.

* **Review Board**
For large changes. Create an account on Hue's [Review Board](https://review.cloudera.org/groups/hue).
Post the patch against the "hue-rw" repository. Enter "hue" in the "groups" field.
Example: [https://review.cloudera.org/r/4019/](https://review.cloudera.org/r/4019/). Blog posts about using [Code Reviews](http://gethue.com/rbtools-example-how-do-easily-do-code-reviews-with-review-board/) and the [extended process](http://gethue.com/the-hue-team-development-process/).
Just post the [pull request](https://github.com/cloudera/hue/pulls) and reviewers will start from there. The CI will run a basic set of tests for you.

## Coding Style

Expand Down
57 changes: 16 additions & 41 deletions docs/docs-site/content/developer/development/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,37 +148,20 @@ Second step is to configure the debug configuration

**Note:**

During the development process if you are facing any problem then, it is recommended to search for information on the [Forum](https://discourse.gethue.com/) and in the [bug tracker](https://github.com/cloudera/hue/issues?q=is%3Aissue+). If the solution is not found then, feel free to create an issue at https://github.com/cloudera/hue/issues.
During the development process if you are facing any problem then, it is recommended to search for information on the [Forum](https://discourse.gethue.com/) and in the [bug tracker](https://github.com/cloudera/hue/issues?q=is%3Aissue+).

Here is a tutorial about how to use the code review tool [Review Board](https://www.reviewboard.org/) for a better productivity!
Here is a tutorial about how to sent a patch request for review.

### Setup

Hue project uses Review Board and Pull Requests for code reviews. For more complex patches it's advisable to use RB than a plain pull request on github. The advantage of Pull Request is that the CI (syntax check, tests…) automatically runs for you (but the diff interface is not as friendly as Review Board).

* Create accounts in https://review.cloudera.org, https://issues.cloudera.org/browse/HUE and https://github.com and share the usernames
* Then, join the 'hue' group in your account https://review.cloudera.org/account/preferences/#groups
* Then [download](https://www.reviewboard.org/downloads/rbtools/) the Review Board tools and install it.
Hue project uses GitHub Pull Requests (PR) for code reviews. The advantage of Pull Request is that the CI (syntax check, tests...) automatically runs for you.

If you've never used git and github before, there are bunch of things you need to [do](https://kbroman.org/github_tutorial/pages/first_time.html) before going further.

Now, clone cloudera/hue:

git clone https://github.com/cloudera/hue

Then, go inside your git repository:

romain@runreal:~/projects/hue$ rbt setup-repo

Enter the Review Board server URL: https://review.cloudera.org
Use the Git repository 'hue' (git://github.com/cloudera/hue.git)? [Yes/No]: yes
Create '/home/romain/projects/hue/.reviewboardrc' with the following?
REVIEWBOARD_URL = "https://review.cloudera.org"
REPOSITORY = "hue"
BRANCH = "master"
[Yes/No]: yes
Config written to /home/romain/projects/hue/.reviewboardrc

Create a new branch with the jira id (HUE-XXX) as the branch name:

git checkout master
Expand All @@ -193,30 +176,25 @@ Then make your changes in code:

### Post a review

We have wrapped up the typical submission in a dedicated [tools/scripts/hue-review](https://github.com/cloudera/hue/blob/master/tools/scripts/hue-review) script prefilled with all the details of the commits:

Now we post the review:
Either post via the GitHub CLI:

tools/scripts/hue-review HEAD~1..HEAD <reviewers> "HUE-XXX [component] <Ticket summary>" --bugs-closed=HUE-XXX
gh pr create --fill --assignee=romainr --web

* Above command must return the review link as given in below example.
* Go to the review link and varify details & press publish. All the reviewers will be informed with an email.
Or push to your branch in your repository forks by doing one time:

eg:
git remote add bob https://github.com/cloudera/hue
git fetch bob

tools/scripts/hue-review HEAD~1..HEAD romain,enricoberti,erickt "HUE-2123 [beeswax] Handle cancel state properly" -bugs-closed=HUE-2123
Then just:

Review request #4501 posted.
git push bob HEAD:ISSUE-1000-fix

https://review.cloudera.org/r/4501


Et voila! Here is our review https://review.cloudera.org/r/4501.
And create the pull request via the button on the https://github.com/cloudera/hue/tree/ISSUE-1000-fix page.

**Note**:
If you have more than one diff, update `HEAD~1..HEAD` accordingly (e.g. `HEAD~2..HEAD`)

Now go to the ticket and add the Review Boad review link as a comment.
In the PR, reference the [GitHub issues](https://github.com/cloudera/hue/issues) if it has one.

### Update a review

Expand All @@ -227,9 +205,9 @@ Modify the previous commit diff:

Update the review:

rbt post -u -r <Review-board-id> HEAD~1..HEAD
git push bob HEAD:ISSUE-1000-fix -f

Again, go to the review link and varify details & press publish.
And it will automatically kick the CI and notify reviewers.

### Ship It

Expand All @@ -247,15 +225,12 @@ Once we get ship it from at least one reviewer, we can push the changes to maste
* Once merged mark the review as submitted - **Close > Submitted**
* Add the commit link to the ticket and mark it as resolved

**Note**:

For lightweight issues, Github [pull requests](https://github.com/cloudera/hue/pulls) are also welcomed! To learn how pull request works please refer this [link](https://github.com/asmeurer/git-workflow).

### Sump-up

We hope that Review Board and these commands will make your life easier and encourage you to [contribute to Hue](https://github.com/cloudera/hue/blob/master/CONTRIBUTING.md) 😉
We hope that these commands will make your life easier and encourage you to [contribute to Hue](https://github.com/cloudera/hue/blob/master/CONTRIBUTING.md) 😉

As usual feel free to send feedback on the [hue-user](http://groups.google.com/a/cloudera.org/group/hue-user) list or [@gethue](https://twitter.com/gethue)!
As usual feel free to send feedback on the [Forum](https://discourse.gethue.com/) list or [@gethue](https://twitter.com/gethue)!


## API Server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ categories:
- Development

---

**December 2020**: GitHub pull requests are now prefered https://docs.gethue.com/developer/development/#development-process

**Note:**

During the development process if you are facing any problem then, it is recommended to check your issues at https://discourse.gethue.com/ and https://github.com/cloudera/hue/issues?q=is%3Aissue+. If the solution is not found then, feel free to create an issue at https://github.com/cloudera/hue/issues.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ categories:
- Development

---

**December 2020**: GitHub pull requests are now prefered https://docs.gethue.com/developer/development/#development-process


After the <a href="https://www.reviewboard.org/" target="_blank" rel="noopener noreferrer">Review Board</a> post, here is another tutorial about becoming an awesome Hue developer: how to run the Hue tests!

Hue has two types of tests:
Expand Down

0 comments on commit 3c7918f

Please sign in to comment.