Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

version management strategy is a plan on how to use branches and repositories that fits your organization and team, Blueriq application, release plan and technical environment best. A carefully chosen version management strategy will enable a stable environment in which changes to the application can be made easily without interfering with each others work and without affecting any part of the application that should not be affected by the change.

 

Panel
titleTable of contents
Table of Contents
maxLevel1

Repository

How to structure the repositories is an architectural matter. Each repository has its own life cycle. Hence, changes in one repository do not affect changes in another repository, unless of course they are connected (e.g. a web service connection). To learn more about functional architectures and decoupling applications read A maintainable and agile architecture.

Branching

A branching strategy is a plan on how to use branches within the repositories. There is no correct branching strategy, but there will be a branching strategy that fits your Blueriq development and the technical environment best. It is recommended to give it some good thought and choose a strategy together and stick to it. Evaluate the branching strategy and adjust if necessary.

A common branching strategy is: 

  • Feature branching in combination with a stable trunk as base. This trunk contains a releasable version of the project in which no changes are made. This way, it is ensured that there will always be a releasable version of the project. To develop a new feature or a small change, a complete copy of the trunk is made; a branch. To ensure that developers don’t interfere with each others work, every major change is done in a separate branch. For example, branch 1 is for developing the 2 small new features X and Y, branch 2 is for bug fixing. Policies have to be put in place to make sure that changes are made in the branch intended for that specific change. This way, developers have their own working copy of the project in which they can make their changes.
    (plus) Features can be developed independently of each other and independent of release cycles.
    (plus) Release a stable version at any time.
    (minus) Long lived feature branches may get (too much) out of sync with the trunk, impeding merging later on.
    (minus) DTAP street must allow the possibility to test the new feature on an appropriate environment.
Info

A stable trunk is a trunk in which no changes are made directly. Changes will be made in a separate branch and merged back to the trunk after they are tested and approved. A stable trunk can be released at all times.

Other branching strategies are for instance:

  • Release branching with early branching: before a development cycle starts (hence the name early branching) a development branch is created. Changes are made, tested and approved in the development branch. At the end of the development cycle the trunk is updated with all or a selection of the changes from the development branch. Note, this strategy also maintains a stable trunk during the development cycle.
    (plus) Release a stable version at any time.
    (plus) Trunk always contains all new features and changes, no conflicts with merging.
    (minus) Modifying the same part of the application or file is not possible or can cause problems.
    (minus) Unfinished features might cause trouble when they are not developed in a separate branch and affect several parts of the application. Parts of the application that were also changed for a feature that is finished, for instance, or a change in a generic function affecting other functionality. 

  • Release branching with late branching: at the end of a development cycle (hence the name late branching) a release branch is created. Changes are made, tested and approved in the trunk. At the end of the development cycles a new branch is created specifically to release a version of the application. Any unfinished changes or features can be left out by not committing them when creating the branch. Note, this strategy involves an unstable trunk as development is done in the trunk and might lead to not being able to release at any time.
    • Variation: in order to be able to create a release at any time a variation to Release branching with late branching can be considered in which there is still an unstable trunk but a release branch is created and repeatedly updated whenever a change tested and approved. For instance, two new features and one small change will be delivered during a development cycle. After the first feature is finished a release branch is created being a copy of the trunk plus the first feature. Later on the development cycle the second feature is merged to the release branch. The small change was only partly finished at the end of the development cycle and hence is not merged to be able to release a stable version of the application.
    (plus) Trunk always contains all new features and changes, no conflicts with merging.
    (plus) A release version can be carefully composed with all the features from the development cycle which you want to include.
    (minus) It will take effort to be able to release at any time (consider the variation if releasing at any time is required).
    (minus) The same concerns as release branching with early branching apply to release branching with late branching. See above.

  • No branching at all: development is done directly in the trunk resulting in an unstable trunk. Tags can be used to indicate milestones or releases which will enable creating a branch of a specific (historic) state of your application if necessary.
    (plus) Simple. A This strategy can be possibility when the application is not yet released at all or possibly for a small application and a small team. Some form of version management though would be advised, consider release branching.
    (minus)

 

Which (Blueriq) branching strategy fits your application depends on your team, projects, DTAP street and/or technical environment. Sometimes a combination of branching strategies might be best, e.g. feature and release branching. There are some elements that might help choosing the best strategy for your project:

  • Do you need a stable trunk or branch? Hence, how important is it to be able to release a stable version at any time?
  • Does the DTAP street support the branching strategy? For instance, is it easy to deploy and test a feature branch?
  • Are there any other systems or applications dependent of the Blueriq project or the other way around? Is it useful to all use the same strategy?
  • Is it uncertain when or if a new features will be implemented? It might be useful to use a feature branch to separate the new feature from existing features. 
  • How many people/teams have to work in the same projects?
Tip

Choose a branching strategy and stick to it across repositories and teams. Evaluate and adjust if necessary.