Currently I am working on a PR for OpenSearch core. Because I am facing some difficulties and questions I want to document my efforts and write a tutorial on how to correctly submit a PR (with all the bells and whistles) to make it easier for others and encourage the community to do the same. Focus will be the surroundings, not so much the coding itself. The audience are experienced developers but with no special knowledge of the OpenSearch eco- or build system.
For now the plan is to use this thread to document by work and describe the challenges and their solutions. If finished (and the PR hopefully merged) I like to extract the relevant stuff into a external document (or blog post, … etc)
The main topics to develop bugfixes, enhancements or new functionalities for OpenSearch core and submit them are IMHO:
- Prerequisites
- Read the Code of Conduct
- Understand the Developer Certificate of Origin (DCO)
- Github account
- Setting up the development environment
- Git, Java, Docker, IDE, …
- Cloning the repositories
- Code something
- Code Formatting
- Javadoc
- Forbidden Apis
- Breaking changes
- About public APIs and backward compatibility
- Logging
- What if I need a new external library
- Write unittests (and probably integrationtests)
- Run tests also with OpenSearch plugins installed (especially security)
- Smoke testing (with a real cluster outside the IDE or build system/CI)
- Assemble OpenSearch
- Track and fix issues with the Java SecurityManager
- Performance testing
- Did I slow down OpenSearch (if the PR is not about performance)
- Did I solve the performance issue (if the PR is actually about enhancing performance)
- Run all the tests and prepare a commit
- Squash and rebase
- Pre commit checks
- Write a proper commit message
- Signing off
- Submit PR
- Open an issue (if not already existing)
- Push the commit(s)
- Fix CI issues
- Mastering the review process
- Documentation
- Submit a PR for the docs
- Write something for the release notes
Makes sense?
Anything missing?