Skip to main content

Gearset agent - building on pipeline work in progress

How to use the agent to build on work in flight in the pipeline. What is the process for initiating this, what does it look like in the pipeline and what potential drawbacks are there.

Written by Patrick Boyd

When working with a pipeline in Gearset, careful thought needs to be given to how you branch your changes if you plan on building on top of a change that is currently not yet merged to your final pipeline environment.

We currently have two different branching strategies for pipelines, the Gearset expanded branching strategy and Gitflow. Each of these work slightly differently, but for both, when you start a new feature in the pipeline, it will cut a feature branch from a set starting point - usually ‘main’ for extended branching and the integration/develop branch for Gitflow.

If you have already made a change and pushed it into a PR that is still in flight down your pipeline (e.g. adding a new field to an object) and you want to make a follow on change (e.g. adding that new field to a report), then when you cut a new feature branch, you will find that the new branch does not contain the first change yet, as it has not completed it’s journey down the pipeline and into the base branch.

How can I pick up and build on a feature that is already in progress in the pipeline?

This feature is new and not yet rolled out across all our customers

You can ask the agent to pick up an already existing feature branch and commit further changes to it. This can be useful if you want the agent to fix a bug or look at validation issues after a feature has been created.

It won’t yet have the context of everything that has changed up to that point, but this is another feature being worked on at the minute and will be coming shortly.

You can do this when you start a conversation, either by clicking the ‘work on an existing feature’ button:

Or by mentioning a feature branch with an @ symbol in the initial prompt, e.g.

You can do this in the middle of a prompt as well:

How can I build on work in flight?

Within the build agent, you can ask it to start a new feature branch and base it on an existing feature branch that is active in your pipeline.

When a conversation has already started

If the conversation has already started and changes have been made, you have the option to ‘include unreleased changes’ into your feature branch:

Clicking this will show you a list of in-flight changes in the pipeline, allowing you to select one.

When you click continue, we will rebase your feature branch on the selected in-flight feature.

You can only do this once for a conversation - it is not possible to base a feature on two items that are in flight.

What do I need to be careful with when building on work in flight?

If you are using the extended pipeline branching model, then your pipeline is designed to ensure ‘feature independence’ - i.e. one PR pushed down the pipeline will not pick up changes from other features along the way.

When you stack a feature on top of an existing feature branch like this, then you need to be careful if the new feature catches up with the one it is built on top of. If this happens, then promoting the newer feature will actually promote all the changes from both features, as they both exist within this newer feature branch.

Did this answer your question?