Contributing to Rancher
We welcome contributions to Rancher! This guide covers the contribution process, code standards, and community guidelines.Getting Started
The official contribution guide is maintained at: Contributing to Rancher This guide provides comprehensive information about:- Setting up your development environment
- Finding issues to work on
- Submitting pull requests
- Code review process
- Community communication channels
Quick Start Guide
Prerequisites
- GitHub account: Required for submitting PRs
- Development environment: See Building Rancher
- Sign the CLA: Contributor License Agreement (required for first contribution)
Fork and Clone
- Fork the repository on GitHub
-
Clone your fork:
-
Add upstream remote:
-
Verify remotes:
Development Workflow
Create a Feature Branch
-
Update your fork:
-
Create feature branch:
Make Changes
-
Write your code
- Follow Go coding conventions
- Add tests for new functionality
- Update documentation as needed
-
Run tests:
-
Verify build:
Commit Your Changes
-
Stage changes:
-
Commit with descriptive message:
Push and Create Pull Request
-
Push to your fork:
-
Create pull request on GitHub:
- Navigate to your fork on GitHub
- Click “Compare & pull request”
- Fill in the PR template
- Reference related issues
Code Style Guidelines
Go Code Standards
Follow standard Go conventions:-
Formatting:
-
Linting:
-
Code organization:
- Package names: lowercase, single word
- File names: lowercase, underscore-separated
- Keep files focused and cohesive
Naming Conventions
Variables and Functions:Documentation
Package documentation:- Explain why, not what (code shows what)
- Document exported functions, types, and constants
- Use complete sentences
- Start with the name of the item being documented
Error Handling
Always handle errors:Testing
Write tests for new code:Pull Request Process
Before Submitting
Checklist:- Code follows Go conventions and style guide
- All tests pass:
go test ./... - New code has test coverage
- Documentation is updated
- Commit messages are clear and descriptive
- PR description explains the change
- Related issues are referenced
PR Template
Fill out the PR template completely:Code Review
Expect feedback:- Reviewers may request changes
- Address all comments
- Ask questions if something is unclear
- Push updates to the same branch
Merging
After approval:- Maintainers will merge your PR
- The branch can be deleted after merging
- Your contribution will be in the next release!
Issue Guidelines
Reporting Bugs
Before creating an issue:- Search existing issues
- Check if it’s already fixed in latest version
- Verify it’s a Rancher issue (not upstream)
Feature Requests
Community
Communication Channels
Rancher Forums:- forums.rancher.com
- General discussion and questions
- Announcements of new releases
- slack.rancher.io
- Real-time chat with community and team
- Technical discussions
- github.com/rancher/rancher
- Bug reports and feature requests
- Pull requests and code reviews
Getting Help
- Documentation: ranchermanager.docs.rancher.com
- Forums: Ask questions in the forums
- Slack: Join #rancher channel for quick questions
- GitHub Issues: For bugs and feature requests
Security Issues
Do NOT open public issues for security vulnerabilities- Review security policy: github.com/rancher/rancher/security
- Email security team: security-rancher@suse.com
- Optional GPG key: Keybase
Best Practices
Development
- Keep PRs focused: One feature or fix per PR
- Write tests: Ensure good test coverage
- Update docs: Keep documentation in sync with code
- Rebase frequently: Keep your branch up to date
- Squash commits: Before merging (if requested)
Communication
- Be respectful: Follow the code of conduct
- Be patient: Reviewers are volunteers
- Be clear: Explain your reasoning
- Be responsive: Address feedback promptly
- Be helpful: Help others in the community
Code Quality
- Follow conventions: Existing code style
- Think about edge cases: Handle errors gracefully
- Consider performance: Efficient implementations
- Maintain backwards compatibility: When possible
- Document public APIs: Clear and complete docs
Release Process
Versioning
Rancher follows semantic versioning:- Major (v2.x.x): Breaking changes
- Minor (v2.8.x): New features, backwards compatible
- Patch (v2.8.3): Bug fixes, backwards compatible
Branches
release/v2.8: Current stable branchrelease/v2.9: Next minor versionmaster: Development branch (future major version)
Release Channels
- Latest: Most recent stable release
- Stable: Production-ready releases
- Alpha: Preview of upcoming features
Additional Resources
Documentation
- Official Docs: ranchermanager.docs.rancher.com
- Contributing Guide: ranchermanager.docs.rancher.com/contribute-to-rancher
- Build Guide: See Building Rancher
Code
- Main Repository: github.com/rancher/rancher
- Go Modules: See
go.modfor dependencies - Contributing File:
CONTRIBUTING.md
Support
- Support Matrix: rancher.com/support-matrix
- Commercial Support: Available from SUSE
- Community Support: Forums and Slack