First off, thank you for considering contributing to Solus! It's people like you that make Solus such a great tool.
- Code of Conduct
- Getting Started
- How Can I Contribute?
- Development Process
- Style Guidelines
- Community
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- Java 17 or higher
- Maven 3.6+
- Docker (for running integration tests)
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/Solus.git cd solus -
Add the upstream remote:
git remote add upstream https://github.com/PhonePe/Solus.git
-
Build the project:
mvn clean install
-
Run tests:
mvn test
Before creating bug reports, please check the existing issues to avoid duplicates.
When creating a bug report, please include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Environment details: Java version, storage backend, OS
- Relevant logs or stack traces
- Code samples if applicable
Use the bug report template when creating an issue.
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- A clear and descriptive title
- Detailed description of the proposed functionality
- Use cases that would benefit from this enhancement
- Potential implementation approach (if you have ideas)
-
Create a branch from
main:git checkout -b feature/your-feature-name
-
Make your changes following our style guidelines
-
Add tests for your changes
-
Ensure all tests pass:
mvn clean verify
-
Commit your changes with a clear message:
git commit -m "Add feature: brief description of changes" -
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request against the
mainbranch
- Follow the PR template
- Include relevant issue numbers (e.g., "Fixes #123")
- Ensure CI checks pass
- Keep PRs focused - one feature/fix per PR
- Update documentation if needed
- Add tests for new functionality
main- Stable release branchfeature/*- New featuresfix/*- Bug fixesdocs/*- Documentation updates
Follow these conventions:
<type>: <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Example:
feat: Add support for Redis storage backend
- Implement RedisStorageContext
- Add Redis-specific data and meta stores
- Include integration tests
Closes #45
# Run all tests
mvn test
# Run specific test class
mvn test -Dtest=AerospikeDeDuperTest
# Run with coverage report
mvn verifyIntegration tests require Docker to be running for Aerospike containers.
We maintain a minimum code coverage threshold. Run the following to generate a coverage report:
mvn jacoco:reportThe report will be available at target/site/jacoco/index.html.
- Follow standard Java naming conventions
- Use 4 spaces for indentation (no tabs)
- Maximum line length: 120 characters
- Use meaningful variable and method names
- Add Javadoc for public APIs
src/
├── main/java/com/phonepe/solus/
│ ├── commands/ # Command interfaces and implementations
│ ├── config/ # Configuration classes
│ ├── exception/ # Custom exceptions
│ ├── filter/ # Bloom filter implementations
│ ├── hbase/ # HBase-specific code
│ ├── shard/ # Sharding logic
│ ├── store/ # Storage backends
│ └── util/ # Utility classes
└── test/java/com/phonepe/solus/
└── ... # Test classes mirror main structure
We use Lombok to reduce boilerplate. Common annotations:
@Data- Generates getters, setters, equals, hashCode, toString@Builder- Generates builder pattern@Slf4j- Generates logger field
- Add Javadoc to all public classes and methods
- Update README.md for user-facing changes
- Include code examples where helpful
To add support for a new storage backend:
-
Create a new
StorageContextimplementation:public class NewStorageContext extends StorageContext { // Implementation }
-
Implement
IDeDuperDataStoreandIDeDuperMetaStoreinterfaces -
Update the visitor pattern in
StorageContext.Visitor -
Add comprehensive tests
-
Update documentation
- GitHub Issues - For bugs and feature requests
- Discussions - For questions and general discussion
Contributors will be recognized in:
- Release notes
- CONTRIBUTORS.md file
- GitHub contributors page
By contributing to Solus, you agree that your contributions will be licensed under the Apache License 2.0.
Thank you for contributing to Solus!