All contributors need to sign the Contributor License Agreement.
- (Re-)Familiarize yourself with What is a Good CockroachDB PR.
Create a local feature branch to do work on, ideally on one thing at a time. If you are working on your own fork, see this tip on forking in Go, which ensures that Go import paths will be correct.
git checkout -b update-readme
Hack away and commit your changes locally using
git add and
Remember to write tests! The following are helpful for running specific subsets of tests:
# Run all tests in ./pkg/storage
make test PKG=./pkg/storage
# Run all kv tests matching '^TestFoo' with a timeout of 10s
make test PKG=./pkg/kv TESTS='^TestFoo' TESTTIMEOUT=10s
# Run the sql logic tests
make test PKG=./pkg/sql TESTS='TestLogic$$'
# or, using a shortcut,
# Run a specific sql logic subtest
make test PKG=./pkg/sql TESTS='TestLogic$$/select$$'
# or, using a shortcut,
make testlogic FILES=select
Logs are disabled during tests by default. To enable them, include
TESTFLAGS="-v -show-logs" as an argument the test command:
make test ... TESTFLAGS="-v -show-logs"
Run the linters, code generators, and unit test suites locally:
This will take several minutes.
When you’re ready for review, groom your work:
Next, push to your fork:
git push -u <yourfork> update-readme
- Then create a pull request using GitHub’s UI. If you know of another GitHub user particularly suited to reviewing your pull request, be sure to mention them in the pull request body. If you possess the necessary GitHub privileges, please also assign them to the pull request using GitHub's UI. This will help focus and expedite the code review process.
Address test failures and feedback by amending your commits. If your change contains multiple commits, address each piece of feedback by amending that commit to which the particular feedback is aimed. Wait (or ask) for new feedback on those commits if they are not straightforward. An
LGTM ("looks good to me") by someone qualified is usually posted when you're free to go ahead and merge. Most new contributors aren't allowed to merge themselves; in that case, we'll do it for you.
Direct merges using GitHub's "big green button" are avoided. Instead, we use bors-ng to manage our merges to prevent "merge skew". When you're ready to merge, add a comment to your PR like this:
Craig (our Bors bot) will run CI on your changes, and if it passes, merge them.