🔮[RFC]: OpenIM: Building an Efficient Version Control and Testing Workflow #1768
Labels
enhancement
New feature or request
feature
Categorizes issue or PR as related to a new feature.
RFC
Project design proposal
The success of an open-source project largely depends on its quality management and collaborative processes. In the OpenIM open-source community, the standardization of project management and testing processes is crucial to ensure the quality and stability of the codebase. This document provides a brief overview of our testing strategy, branch management, quality control policies, and how they are applied to the main branch, PR testing branches, and stable release branches to meet the needs of developers, testers, and community managers. Additionally, we will introduce the standards, testing schemes, and project management strategies of the OpenIM open-source community, aiming to provide clear guidance to ensure project stability and sustainability.
Branch Management and Version Control
For OpenIM, branch versioning strategies are especially important, involving deployment branch strategies and image versioning strategies. These two aspects are detailed in the following articles:
In summary:
In the OpenIM community, the
main
branch is considered the representative of the stable version. All code must undergo rigorous code review and testing to ensure its quality and stability before being merged into themain
branch.The
release
branch is used for releasing stable versions. The image versions used inopenim-docker
andopenim-k8s
are also namedrelease-v3.*
. Any changes on therelease
branch should be well-planned additions of features or fixes for known issues. Testing efforts should focus on therelease
branch to ensure the reliability of the release versions.Testing Strategy
Testing on the Main Branch
Testing on the
main
branch should cover core functionalities and critical paths to ensure the stability of basic features. Testing work includes unit testing, integration testing, and end-to-end testing, all of which are automated and require no manual intervention.Testing on Release Branches
For three repositories: https://github.com/openimsdk/open-im-server, https://github.com/openimsdk/chat, and https://github.com/openimsdk/openim-sdk-core:
Testing on the
release
branch demands stricter standards. The testing team should thoroughly test all functionalities, with particular emphasis on checking whether previously known issues have been resolved. Ensuring there are no potential issues before a release is essential.PR Merge Rules:
Taking this PR as an example:
Firstly, the PR title, "PR title: fix pageFindUser". It's important to note that
git commit
messages follow a specific format:For all release branches, we require the following format:
git commit
types can be one of the following:feat
: New feature (feature)fix
: Bug fixdocs
: Documentationstyle
: Code style (no code changes affecting execution)refactor
: Code refactor (neither adding a feature nor fixing a bug)test
: Adding testschore
: Build process or auxiliary tool changesperf
: Performance improvementrevert
: Revert changesbuild
: Build processci
: Continuous integrationupdate
: Updateadd
: Additiondelete
: Deletioninit
: Initializationmerge
: Mergemove
: Moverename
: Renamesync
: Syncrelease
: Releasehotfix
: Hotfix for productionoptimize
: Optimization[optional scope]
is required and should be filled withrelease-v3.5
.<description>
should describe the purpose of the PR.Thus, a correct PR title description should be:
Pull Request (PR) Testing Branches
Every submitted PR should have corresponding testing branches. These branches can be for feature testing or bug testing, and the specific testing criteria are determined by the branch owner. However, when testing branches are merged into the
main
orrelease-v3.5
branches, they must adhere to the requirements of the respective main branches.Project Management
The OpenIM community adopts a transparent project management approach to facilitate better collaboration and project monitoring.
Based on OpenIM's branch design specifications, different strategies are applied to
main
,release-v3.*
, and other branches for project management:PR Workflow
main
branch.v3.5
on the corresponding linked issue for this PR.v3.5
on therelease-v3.5
branch and create a PR.🎯 Describe how to verify it
section of the PR description.Review Guidelines
Release Branch Testing Steps
/lgtm
command in the comments.Note: How to Test this PR
Using #1750 as an example, you have two deployment options:
Server Deployment:
$(docker ps -qa)
-
docker rmi $(docker ps -qa)-
docker network prune -f`Fetch the corresponding code using
gh
orgit
:Enter the test directory, open the
docker-compose.yaml
file, and uncomment the sections foropenim-chat
,openim-admin
,prometheus
,alertmanager
,node-exporter
, andgrafana
.In addition to local or server testing, you can also use GitHub's
codespaces
.In
codespaces
, use port forwarding to access the openim-web for testing.Future Automation Testing Design
The OpenIM community plans to continually improve automation test coverage to reduce manual testing efforts. More automation test scripts will be developed to ensure code quality and stability.
Conclusion
The OpenIM open-source community is dedicated to providing high-quality open-source instant messaging solutions. Through strict standards, testing strategies, and project management, we can ensure the success and sustainability of the project. We welcome more contributors, developers, and community managers to participate and collaborate. We hope these guidelines contribute to the growth of our community and projects.
The text was updated successfully, but these errors were encountered: