Skip to content

OceanBase Contributing Guidelines

Thank you for considering contributing to OceanBase.

We welcome any type of contribution to the OceanBase community. You can contribute code, help our new users in the DingTalk group (Group No.: 33254054), Slack group or in StackOverflow, test releases, or improve our documentation.

If you are interested in contributing code to OceanBase, please read the following guidelines and follow the steps.

Start off with the right issue

As a new contributor, you can start off by looking through our good first issues. If none of them feels right for you, you can create a new issue when you find one. If you find an issue for you, please assign this issue to yourself in the issue topic and add the developing label to indicate that this issue is being developed.

Contribute code changes

  1. Fork the OceanBase repository.

  2. Visit the OceanBase GitHub repository.

  3. Click the Fork button in the upper-right corner to fork one branch.

  4. Configure the local environment.

working_dir=$HOME/{your_workspace} # Define the working directory of your choice. 
user={github_account} # Make sure the user name is the same as your GitHub account. 
  1. Git clone the code.
mkdir -p $working_dir
cd $working_dir
git clone git@github.com:$user/oceanbase.git

# Add the upstream branch.
cd $working_dir/oceanbase
git remote add upstream git@github.com:oceanbase/oceanbase.git
# Or choose: git remote add upstream https://github.com/oceanbase/oceanbase

# Set no_push for the upstream branch.
git remote set-url --push upstream no_push

# Check if the upstream works as expected.
git remote -v
  1. Create a new branch.
# Check out the local master.
new_branch_name={issue_id} # Define the branch name. It is recommended that you use {issue+id} for the branch name. 
cd $working_dir/oceanbase
git fetch upstream
git checkout master
git rebase upstream/master
git checkout -b $new_branch_name
  1. Finish all the developing tasks in the new branch, including the testing tasks.
  2. Submit changes to your branch.
# Check the local status.
git status

# Add files for submission.
# Directly add all changes using `git add .`
git add <file> ... 
# In order to relate the pull request automatically to the issue, 
# it is recommended that the commit message contain "fixed #{issue_id}". 
git commit -m "fixed #{issue_id}: {your_commit_message}"

# Sync upstream before push.
git fetch upstream
git rebase upstream/master
git push -u origin $new_branch_name
  1. Create a pull request.
  2. Visit your fork repository.
  3. Click the Compare & pull request button next to the {new_branch_name} to create a pull request.
  4. Sign the Contributor License Agreement (CLA) aggreement. The workflow can continue only after you sign the CLA aggreement.

CLA

After you submit your updates, OceanBase will review and comment if needed. Once we approve your updates, the system will automatically run CI testing and stress testing. If no issues are found in the tests, your updates will be merged. Now you have successfully completed your contribution task and become one of our contributors.