- Find something to work on: good first issues
- Build from source
- Read the style guide
Trivial changes: We typically do not accept trivial spelling/wording changes to comments or error messages unless they are part of a larger change, as they can cause merge conflicts in ongoing development.
- Sign the Contributor License Agreement.
- Create a feature branch and make your changes.
- Write tests. CockroachDB uses several test frameworks:
- Go unit tests (
TestXXXin the same package) — most common. - Data-driven tests via
datadriven.RunTest, with files intestdata/. - SQL logic tests via
logictest.RunLogicTest— for SQL behavior changes. - Roachtests in
pkg/cmd/roachtest— for tests needingcockroach startor long runtimes.
- Go unit tests (
- Format with
crlfmt -w -tab 2 <file>.go. - Run
./dev generate && ./dev lint --short && ./dev test pkg/your/package. - Follow the commit message guidelines: commit message is the primary record, not the PR description. Include release note annotations.
- Push and create a PR.
- Merge via
/trunk merge(not the green button).
As a reviewer:
- Respond within a few business hours for small PRs, 24 hours for larger ones.
- Discuss design before details. If you foresee multiple passes, say so upfront.
- Check release notes: user-facing changes must be mentioned, backward-incompatible changes highlighted.
- Prefix minor style suggestions with "nit:".
As an author:
- Expect comments on test coverage, Go idioms, and nits.
- Read the style guide before your first PR.
- Building from source
- Go style guide
- Commit and PR guidelines
- Backporting
- Configuration UX guidelines for cluster settings, flags and knobs
- Architecture overview
Join our Community Slack (#contributors channel) to ask questions or connect with other contributors.
Please read and follow our Code of Conduct.