Getting Started
Choose Your Project
CockroachDB offers different contribution paths based on your experience and interests:New Developers
To-Do Apps ProjectBuild a to-do app using CockroachDB with your favorite language/ORM.View Repository →
Go Developers
Core CockroachDBWork on the main CockroachDB codebase. Check out good first issues.Good First Issues →
Kubernetes Enthusiasts
Documentation
Development Workflow
Join the Community
Join our Community Slack (there’s a dedicated
#contributors channel!) to ask questions and connect with other contributors.Please follow our Code of Conduct to help keep the community welcoming.Find or Create an Issue
Before starting work:
- Check existing issues or create a new one
- Comment on the issue to claim it
- Discuss your approach for larger changes
For significant features or architectural changes, consider writing an RFC first. See the RFC process.
Make Your Changes
Follow the coding guidelines and ensure your changes:
- Are well-tested
- Include appropriate comments
- Follow the style guide
- Don’t break existing functionality
Test Your Changes
Coding Standards
Code Quality Guidelines
CockroachDB is a complex distributed system. Write code with future maintainers in mind:Documentation & Comments
Documentation & Comments
- Explain key concepts and abstractions clearly
- State lifecycles and ownership explicitly
- Use examples to make code accessible
- Comments should add depth, not repeat the code
Code Formatting
Code Formatting
- Use
crlfmt -w -tab 2 <file>.gofor formatting - Enforces 100-column code lines
- 80-column comments
- CockroachDB-specific import grouping
crlfmtaccepts one filename at a time
Distributed System Awareness
Distributed System Awareness
CockroachDB supports rolling upgrades, so:
- Be mindful of compatibility when changing shared state
- Consider inter-process communication carefully
- Review
pkg/clusterversionfor version handling - Test mixed-version scenarios when relevant
Testing Requirements
Testing Requirements
- Write tests for new functionality
- Update tests when changing behavior
- Include both unit and integration tests
- Consider edge cases and failure scenarios
- Add logic test files for SQL features
Commit Message Guidelines
Follow the commit message format used by the project:See the wiki for detailed commit message guidelines.
Code Review Process
What Reviewers Look For
Technical Correctness
- Logic is sound
- No race conditions
- Proper error handling
- Performance implications
Code Clarity
- Clear naming
- Good documentation
- Accessible to non-experts
- Examples where helpful
Testing
- Adequate test coverage
- Tests are meaningful
- Edge cases covered
- No flaky tests
Style & Convention
- Follows project patterns
- Properly formatted
- Minor nits prefixed with “nit:”
- Consistent with codebase
Responding to Reviews
- Address all comments, even if just to acknowledge
- Push new commits rather than force-pushing (makes review easier)
- Mark resolved threads as resolved
- Ask questions if feedback is unclear
- Be open to suggestions and alternative approaches
Resources
Contributing Wiki
Comprehensive contributor guidelines on the public wiki
Your First PR
Step-by-step guide for first-time contributors
Community Slack
Join #contributors channel for help and discussion
Code of Conduct
Guidelines for community participation
Additional Topics
The contributor wiki covers:- Repository layout and organization
- Commenting guidelines and standards
- How to write release notes
- Submitting changes for review
- Using continuous integration (CI)
- Troubleshooting common issues
- Performance testing guidelines
- Documentation standards
Getting Help
If you need assistance:- Check the contributor wiki
- Ask in the
#contributorsSlack channel - Comment on the relevant GitHub issue
- Tag reviewers or maintainers for specific questions