openimsdk / open-im-server

IM Chat
https://openim.io
Apache License 2.0
13.39k stars 2.36k forks source link

🔮[RFC]: OpenIM: Building an Efficient Version Control and Testing Workflow #1768

Open cubxxw opened 5 months ago

cubxxw commented 5 months ago

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 the main branch.

The release branch is used for releasing stable versions. The image versions used in openim-docker and openim-k8s are also named release-v3.*. Any changes on the release branch should be well-planned additions of features or fixes for known issues. Testing efforts should focus on the release 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:

<type>[optional scope]: <description>

For all release branches, we require the following format:

Thus, a correct PR title description should be:

fix(release-v3.5): fix user search page issue

For more documentation, refer to: https://github.com/cubxxw/awesome-cs-course/blob/master/Git/README.md

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 or release-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

Review Guidelines

Release Branch Testing Steps

Note: How to Test this PR

Using https://github.com/openimsdk/open-im-server/pull/1750 as an example, you have two deployment options:

Server Deployment:

In addition to local or server testing, you can also use GitHub's codespaces.

Learn more at: https://docs.github.com/en/codespaces/getting-started/quickstart

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.

kubbot commented 3 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

kubbot commented 3 months ago

This issue was closed because it has been stalled for 7 days with no activity.

kubbot commented 2 weeks ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.