AoneFlow introduces new automation and branch management tools

AoneFlow incorporates the strengths of both Trunk Based and ** Git Flow ** while introducing new automation and branch management tools for timely release of quality software products.

** Automation and new branch management processes are revolutionizing software development. ** ** image.png

While TrunkBased and GitFlow can meet the branch management needs of most developers in terms of easy integration and manageable requirements features, Alibaba is more efficient without the hassle of manual intervention. I needed a system and improved branch management tools. In response, Alibaba's technical team has developed a new branch management mode, AoneFlow. AoneFlow incorporates the strengths of both Trunk Based and Git Flow, while introducing new automation and branch management tools to ensure timely release of quality software products.

Branch management foundation: TrunkBased and GitFlow

AoneFlow is partly based on the structure and functionality of TrunkBased and GitFlow, the branch management techniques most commonly used by software developers. Both systems offer useful features, and AoneFlow, which is based on existing systems, has the advantage of being familiar to software developers.

TrunkBased The advantage of TrunkBased is continuous integration. Its structure consists of a single trunk branch and many release branches. Each release branch is created from the trunk with a specific version of the commit point for online deployment and hotfixes. There is no explicit feature branch. Whereas GitFlow allows each developer to have a local branch, TrunkBased does not exclude short-lived feature branches. However, this feature is not widely used by TrunkBased developers.

TrunkBased has become less popular with GitFlow in recent years due to some drawbacks. First, if you have too many teams coding in the same trunk, you may get an error during release. FeatureToggle was implemented as a solution, but it requires frequent integration and proper test coverage, which overwhelms the development team's capabilities. As a result, TrunkBased is often used in SaaS projects where you don't need to manage multiple past versions at the same time. These projects are primarily small-scale services that have undergone a transformation of microservices.

TrunkBased mode has two evolutions. OneFlow and Multi-Trunk. OneFlow uses many of the same features as TrunkBased, but with a more rigorous definition of behavioral flow and additional features like the Hotfix branch. Multi-Trunk uses a fixed release branch in addition to the dual trunk and fixed development branch.

GitFlow GitFlow has a different structure than TrunkBased. It consists of a trunk branch and a number of feature branches, release branches, and hotfix branches. GitFlow was previously most used by process-oriented companies due to its clear operational definition at each stage. However, GitFlow is not user-friendly and contains a lot of tedious merge rules. Merge conflicts and integration testing issues are often the subject of criticism.

A lesser-known branch management method is Github Flow, which is basically TrunkBased with the addition of a personal warehouse and pull request code merge operation. This process is similar to adding individual branches to the same warehouse, making it ideal for distributed teams. GithubFlow also has its own evolution, with GitlabFlow leveraging deployments in multiple environments, associating warehouses and branches within those environments.

New evolution: AoneFlow

AoneFlow's structure, features, and processes differ from Trunk Based and GitHub in several important areas.

Like its predecessor, AoneFlow aims for simple continuous integration (TrunkBased) and manageable requirements features (GitFlow). It also maintains the basic structure of the three branch types: trunk branch, feature branch, and release branch.

However, AoneFlow starts with its predecessor by establishing three core rules for branch management workflows.

  1. Before you start, create a functional branch from your trunk.
  2. Combine feature branches to form a release branch.
  3. After releasing to the online formal environment, merge the corresponding release branch into the trunk, add tags to the trunk, and remove the feature branch associated with the release branch.

Rule 1. Create a feature branch

The AoneFlow feature branch was adopted by GitFlow. When a new job is started (creating a new function, resolving an error, etc.), a feature branch with the "feature /" prefix is created from the trunk that represents the latest release version. Code changes are committed in this branch. Each job corresponds to one feature branch, and changes cannot be committed directly to the trunk, as shown in the figure below.

image.png Creating a feature branch

Rule 2. Unform the branch

This rule is AoneFlow's most innovative achievement.

With existing branch management methods, GitFlow pulls the completed feature branch back into the common mainline (development branch), merges it, and pulls the release branch from the common mainline. TrunkBased likewise waits for the required functionality to be developed on the trunk branch and pulls the release branch from a specific location on the trunk branch.

In contrast, AoneFlow pulls a new branch from the trunk and merges all feature branches waiting for release or integration to create a release branch (usually prefixed with "release /". ).

While simple, it has a wide range of uses. Release branches are flexible and can be associated with a particular environment using assembly line tools (for example, a release / test branch is paired with a deployment test environment). This tool connects code quality scans and automated test levels to a wide variety of environments. Finally, the output deployment package is released directly to the appropriate environment.

image.png

Formation of release branch

At a higher level, release branches can be associated with multiple environments for tasks such as chaining gradual and official releases. This adds a human inspection step to ensure reliability. You can also create a continuous integrated assembly line by associating functional branches according to an iterative plan, creating a fixed release branch by iterative evolution, and linking a set of environments to the assembly line of the release branch. You can also implement the effects of TrunkBased by associating all functional branches and devoting all commits to integration testing.

In addition, the release branch feature configuration is dynamic and easy to adjust.

For example, a small company that employs “agile operations” may have to abandon feature releases due to changes in market strategy or have to remove features at the last minute due to an error. This usually requires manually "checking the code" or removing the associated commitments that have been merged one by one into the development or trunk branches.

In contrast, AoneFlow allows you to build a release branch in less than a minute. This is done by deleting the original release branch, pulling a new release branch with the same name from the trunk branch, and merging the feature branches that need to be retained. This series of operations can be automated, clean and pollution-free.

Finally, the loosely coupled release branches allow you to integrate and test multiple integrated environments based on a combination of different features. It's also useful for managing when features are deployed in different environments. Despite being loosely coupled, there is a correlation between release branches. Release steps for test, integrated, pre-release, phased, and online formal environments are typically performed sequentially. This means that users can set requirements, and only characteristics that have passed validation in the previous environment can be transferred and deployed to the next environment. The result is a funnel-shaped feature release stream.

In addition, Alibaba has created a unified platform for automating and migrating the combination of features between release branches as described in the next section.

Rule 3. Release the online deployment of the branch

When the release branch assembly line completes the deployment of the online formal environment, it means that the corresponding feature has been released. In this case, the release branch must be merged into the trunk. You should also clean up feature branches that are already online to avoid a large buildup of past feature branches in your code warehouse.

In AoneFlow, the latest version of the trunk branch is always the same as the online version (similar to GitFlow). If the user wants to trace back a past version, all they have to do is find the corresponding version label on the trunk branch.

image.png

Structure: Rule 3

Additional rules

AoneFlow adds some practical operations alongside rules 1-3. For example, when a hotfix comes online, the normal process is to create a new release branch (equivalent to the hotfix branch) for your online environment. It then creates a temporary assembly line for the release branch so that pre-release inspections and smoke tests can be performed automatically.

AoneFlow allows you to find the location of the version label on your trunk branch and create a hotfix branch directly there. This allows the user to effectively perform some important operations.

--Clear the feature branch of the release branch based on the corresponding online formal environment. --Modify the release branch directly. --Automatic release using existing assembly line

User experience optimization

Alibaba is consistently looking for optimizations in its branch management process. Recently, we have recorded Java development best practices and compiled them in the Alibaba Java Development Manual. This allowed the entire team to standardize Java development and improve the quality and efficiency of their work.

Standardization also helped solve task-based issues such as rebuilding the release branch. Rebuilding the release branch requires a merger, after which the code must be compiled to generate a new deployment package. However, if software functionality relies on third-party software packages, software behavior can be inconsistent.

As a solution, we have added a rule to our coding guidelines that online release code should not use dependent packages that include "SNAPSHOT versions" or unofficial releases. These guidelines give our team more control over the quality of the products they produce.

We've also added a number of tools to make it easier for developers. For example, the AoneFlow platform no longer requires developers to manually create, merge, and modify branches using Git commands. Manual work is error-prone and time consuming. The AoneFlow platform denies these issues by controlling the entire R & D process and adding a number of built-in service components to increase R & D efficiency. This platform offers several important benefits.

--Full process automation --Improved release branch --Enhancement of branch-related management

Full process automation

The AoneFlow platform provides requirements proposals, division of requirements into tasks, online creation of functional branches, generation of release branches by aggregating functional branches, automatic creation of template-based test environment, late operation and maintenance (O & M), etc. Introduces automation of the branch management process for the functionality of.

On the front end, AoneFlow ensures normalization of feature branch names by controlling feature branch association and monitoring requirements. The backend handles release branch associations and deployments to ensure the reliability of the source version. Overall, AoneFlow handles about 80% of Alibaba Group's online deployments.

Improved release branch assembly line

There are many code branches in the AoneFlow life cycle. Creating and updating these branches involves complex actions. By automating this process, quality and efficiency are not lost due to human error.

AoneFlow uses an automated CI / CD assembly line to create and update branches of code. This assembly line links all the independent branches of code in the life cycle and directs them more efficiently towards the intended functionality (eg commit code for integration testing). .. This is especially true for release branches, which can be associated with a particular deployment environment. You can check the new code merged into your branch and deploy it more efficiently.

In an ideal branch management scenario, each branch should be paired with an assembly line that matches its role. The release branch of AoneFlow is relatively fixed compared to GitFlow and is easy to integrate, so almost all assembly line tools available are compatible with AoneFlow.

AoneFlow also includes additional features such as code reviews, security checks, and online assembly line deployments to improve and optimize the development team's user experience.

Improved branch association maintenance

Maintaining the association between feature and research branches is a unique issue that AoneFlow addresses.

When making changes to an existing feature combination, it's important to remember which feature branch the release branch came from. For example, if a feature is removed from a particular release branch, multiple feature branches, including those that don't contain that feature, will be merged and replaced with the original release branch. It is difficult and time consuming to manually record which branches have been merged.

AoneFlow includes several automation features that improve this process. When a particular feature combination is validated in a low-level release environment (such as integration testing), the content is migrated directly to the corresponding release branch in the high-level environment (such as pre-release). This ensures that the online version has passed pre-release validation, the pre-release version has passed integrated validation, and other important processes. This connects all release branches in a series. This can be done with regular Git commands, but AoneFlow's visual tools make it more intuitive.

In addition, AoneFlow can uniformly display the status of branches in the code warehouse, such as machine information and operation records of the deployment environment of the corresponding branch.

Overview

Alibaba's AoneFlow is an evolution of branch management that leverages the strengths of TrunkBased and GitFlow.

The benefits of this new branch management method are:

--Easy integration modeled on Trunk Based --Easy-to-manage requirement functions modeled on GitFlow --Define rules and processes to ensure efficiency and quality --Automated functions --Improved release branch management --Maintenance of improved branch associations

AoneFlow provides a flexible platform for software developers to adapt to the dynamic branch management lifecycle, work efficiently, and release high-quality software products. Allows you to have more control over.

Alibaba Tech First hand, details, detailed information of Alibaba's latest technology → Search for "Alibaba Tech" on Facebook

Recommended Posts

AoneFlow introduces new automation and branch management tools
Command mechanism and management tools