Menu

App versioning strategy

3 Comments

app versioning strategy

It focuses around Git as the tool for the versioning of app of our source code. For a thorough discussion on the pros and cons of Git compared to centralized source code control systems, see the web. There are plenty of flame wars going on there. As a developer, I prefer Git above all other tools around today. Git really changed the way developers think of merging and branching. But with Git, these actions are extremely cheap and simple, and they are considered one of the core parts of your daily workflow, really. As a consequence of its simplicity and repetitive nature, branching and merging are no longer something to be afraid of. We will refer to this repo as originsince this name is familiar to all Git users. Each developer pulls and pushes to origin. But besides the centralized push-pull relationships, each developer may also pull changes from other peers to form sub teams. For example, this might be useful to work together with two or more developers on a big new feature, before pushing the work in progress to origin prematurely. In the figure above, there are subteams of Alice and Bob, Alice and David, and Clair and David. At the core, the development model is greatly inspired by existing models out there. The central repo holds two main branches with an infinite lifetime:. The master branch at origin should be familiar to every Git user. Parallel to the master branch, another branch exists called develop. This is where any automatic nightly builds are built from. When the source code in the develop branch reaches a stable point and is ready to be released, all of the changes should be merged back into master somehow and then tagged with a release number. How this is done in detail will be discussed further on. Therefore, each time when changes are merged back into masterthis is a new production release by definition. We tend to be very strict at this, so that theoretically, we could use a Git hook script to automatically build and roll-out our software to our production servers everytime there was a commit on master. Next to the main branches master and developour development model uses a variety of supporting branches to aid parallel development between team members, ease tracking of features, prepare for production releases and to assist in quickly versioning live production problems. Unlike the main branches, these branches always have a limited life time, since they will be removed eventually. Each of these branches have a specific purpose and are bound to strict rules as to which branches may be their originating branch and which branches must be their merge targets. We will walk through them in a minute. The branch types are categorized by how we use them. They are of course plain old Git branches. Feature branches or sometimes called topic branches are used to develop new features for the upcoming or a distant future release. When starting development of a feature, the target release in which this feature will be incorporated may well be unknown at that point. The essence of a feature branch is that it exists as long as the feature is in development, but will eventually be merged back into develop to definitely add the new feature to the upcoming release or discarded strategy case of a disappointing experiment. Finished features may be merged into the develop branch to definitely add them to the upcoming release:. The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature. In the latter case, it is impossible to see from the Git history which of the commit objects together have implemented a feature—you would have to manually read app the log messages. Reverting a whole feature i. Yes, it will create a few more empty commit objects, but the gain strategy much bigger than the cost. Release branches support preparation of a new production release. Furthermore, they allow for minor bug fixes and preparing meta-data for a release version number, build dates, etc. By doing all of this work on a release branch, the develop branch is cleared to receive features for the next big release. The key moment to branch off a new release branch from develop is when develop almost reflects the desired state of the new release. At least all features that are targeted for versioning release-to-be-built must be merged in to develop at this point in time. All features targeted at future releases may not—they must wait until after the release branch is branched off. It is exactly at the start of a release branch that the upcoming release gets assigned a strategy number—not any earlier. Release branches are created from the develop branch. For example, say version 1. So we branch off and give the release branch a name reflecting the new version number:. After creating a new branch app switching to it, we bump the version number. This can of course be a manual change—the point being that some files change. Then, the bumped version number is committed. This new branch may exist there for a while, until the release may be rolled out definitely. During that time, bug fixes may be applied in this branch rather than on the develop branch. Adding large new features here is strictly prohibited. They must be merged into developand therefore, wait for the next big release. When the state of the release branch is ready to become a real release, some actions need to be carried out. First, the release branch is merged into master since every commit on master is a new release by definitionremember. Next, that commit on master must be tagged for easy future strategy to this historical version. Finally, the changes made on the release branch need to be merged back into developso that future releases also contain these bug fixes. Versioning keep the changes made in the release branch, we need to merge those back into developthough. This step may well lead to a merge conflict probably even, since we have changed the version number. If so, fix it and commit. Hotfix branches are very much like release branches in that they are also meant to prepare for a new production release, albeit unplanned. They arise versioning the necessity to act immediately upon an undesired state of a live production version. When a critical bug in a production version must be resolved immediately, a hotfix branch may be branched off from the corresponding tag on the master branch that marks the production version. The essence is that work of team members on the develop branch can continue, while another person is preparing a quick production fix. But changes app develop are yet unstable. We may then branch off a hotfix branch and start app the problem:. This is completely similar to how release branches are finished. Back-merging the bugfix into the release branch will eventually result in the bugfix being merged into develop too, when the release branch is finished. If work in develop immediately requires this bugfix and cannot wait for the release branch to be finished, you may safely merge the bugfix into develop now already as well. It forms an elegant versioning model that is easy to comprehend and allows team members to develop a shared understanding of the branching and releasing processes. A high-quality PDF version of the figure is provided here. Go ahead and hang it on the wall for quick reference at any time. And for anyone who requested it: Vincent Driessen is an independent Python software engineer and consultant from the Netherlands. You may hire him. Home Posts About A successful Strategy branching model. By Vincent Driessen on Tuesday, January 05,

Versioning strategy for a complex internal API

Versioning strategy for a complex internal API app versioning strategy

3 thoughts on “App versioning strategy”

  1. Andy_mag says:

    The most comprehensive source for letters written by the members of the Continental Congress.

  2. ADialog says:

    Freethinkers begins with the fierce debate over omitting God from the constitution, and moves from the abolitionist, suffragette, civil rights, and feminist movements to contemporary battles over religious influence in government.

  3. adsellers says:

    It has been a fascinating mystery all my life through the family.

Leave a Reply

Your email address will not be published. Required fields are marked *

inserted by FC2 system