Skip to main content

Abandoning a feature in Gearset Pipelines (expanded branching model)

How to permanently drop a feature you no longer need, removing it from every environment it has reached before production.

Written by Jacob Joshua

Sometimes a feature you've started promoting through your pipeline is no longer needed. This guide shows you how to remove it cleanly in Gearset, wherever it is in your pipeline, for example QA or UAT, before it reaches production.

Abandoning a feature takes time and carries some risk. If your team does this often, look at whether an earlier part of your process, such as reviews or testing, could catch these issues sooner.

Only want to remove part of a feature? See Removing components from a feature. Already in production? See Rollback with Gearset Pipelines.

Key terms

Term

What it means

Feature

A piece of work moving through your pipeline.When an individual team member has a change they want to push through the release pipeline, they first create a feature branch from the Main (or Master) branch.

First environment

The first environment after your developer sandboxes, for example QA or Integration.

Stale

A feature that has moved past the first environment and then had new commits added to its feature branch. Gearset won't let it move further until a fix catches up.

Fix PR

A new PR that Gearset creates to carry a change through the pipeline to a stale feature.

Step 1: Find where the feature is

In your pipeline, select Features at the top of the page, then Open features in the left-hand menu. This lists only features that are still in progress. Use the search box, or filter by Environment or User, to find the feature.

Each open feature shows Next: and an environment name. That's the environment it's waiting to be promoted into:

  • If Next is your first environment (for example, QA), it hasn't been promoted yet.

  • If Next is a later environment, it has already been promoted into the environments before it.

What you do next depends on how far it has got:

Where the feature is

What to do

Waiting to go into the first environment, never promoted

Close the PR in Gearset. If auto-delete feature branches is on, this may also delete the feature branch, so keep a copy if you might reuse the work. Then delete the components from your developer sandbox if you no longer need them.

Already promoted into the first environment or beyond

Follow steps 2 to 4. Closing the PR won't remove changes that are already in your orgs or their environment branches.

Part of a release or release candidate

Ask whoever manages your releases to remove it from the release or release candidate first, then follow steps 2 to 4.

Why closing the PR isn’t enough: Once a feature has been promoted, its changes are already in that environment. If you close the PR, they stay there, and Gearset’s reverse merges will pull them into every feature promoted after it.

Step 2: Check before you start

  • Tell your team the feature is being abandoned, so nobody promotes it further. For example, in a comment on the PR or in a ticket linked with that PR.

  • Check whether the feature includes anything Salesforce can't delete through a deployment, such as record types. See what the Metadata API can't delete. You'll need to remove these manually in each org, or add them as pre- or post-deployment steps.

Step 3: Undo the feature's changes

The goal is to change the feature so it no longer changes anything. Choose one option:

Option

Use it when

How

Roll back

The feature has only one or two commits, made in Gearset

In deployment history, find each commit made to the feature branch, select Roll back, and commit to the same feature branch. See Rolling back a deployment.

Compare and commit

The feature has several commits

Run a manual comparison with your main branch (or a sandbox without the changes) as the source and the feature branch as the target. Don’t pick the promotion branch which begins with gs-pipeline/ and ends in _-_ followed by an environment name. Select only this feature’s components, including those marked Deleted (new items the feature added) and Changed (items it edited), then commit. This removes the feature’s changes, so those components match your source, for example main branch.

Delete in your sandbox

You also want the feature removed from your developer sandbox

Delete the components in your sandbox, then use Commit more changes on the feature. See Promoting your first features in Gearset Pipelines.

If someone on your team made the changes outside Gearset, ask them to revert those commits on the feature branch instead.

Step 4: Send the removal through the pipeline

Because the feature has already been promoted, you need a fix PR to carry the removal through the pipeline.

  1. In your pipeline, select your developer sandbox and choose the feature branch, then select Create fix pull request. See Fix Forward: How to edit or fix your features in progress.

  2. Promote the fix PR through each environment until it reaches the one where the original feature is waiting. This removes the feature from each org as it goes.

  3. Gearset then unblocks the original feature, which should now show no changes.

  4. Delete the original PR and its feature branch with the bin icon.

Note:

  • If any merge conflicts were resolved when the feature was first promoted, check that the fix PR handles them correctly.

  • Don’t close the fix PR partway through. If you do, the feature is removed from some environments but not others, and the original PR stays blocked.

Not recommended

  • Merging a stale feature directly in GitHub (or any other Version Control System used with your pipeline). Gearset only blocks a stale feature from promoting inside Gearset, so merging it in your version control system skips the fix, and the removal is never deployed.

  • Using GitHub's Revert button (or your Version Control System's equivalent) on each environment's merged PR. This skips the feature branch and reverts only that one environment's branch. Gearset then tries to promote the revert changes to the next environment along with every other change on that branch, including other features' work. That can break your CI jobs and leave your environment branches out of sync.

  • We don't recommend editing branches whose names start with gs-pipeline/ or gs-pipeline-fix/. Gearset treats the feature branch as the source of truth and may not keep changes made directly in promotion branches. The only exception is resolving merge conflicts.

Final steps

  • If you didn't delete the components in your sandbox, do that now, or tell anyone who shares the sandbox, so the feature isn't committed again.

  • If needed, update the linked ticket in your issue tracker, such as Jira, to show the feature was abandoned.

Did this answer your question?