Online Conflict Resolution

Updated 1 month ago by Copado Solutions

Introduction

While merging a user story feature branch into a promotion branch, Copado can encounter file conflicts. These conflicts are automatically resolved by Copado following different strategies (check out the article Conflict Resolution with Git Integration for more information about this).

However, there may be conflicts in certain metadata types that you don’t want Copado to auto-resolve, and you want to manually fix them instead. In this case, you can use Copado’s Online Conflict Resolution feature.

Setup

The Online Conflict Resolution feature can be activated in two different places: :

  1. In your pipeline:
    1. Edit the Pipeline record.
    2. Select the metadata types you want to manually resolve conflicts for in the Exclude From Auto Resolve picklist field::
    1. Save the changes.
      From now on, all the promotions linked to this pipeline will have the same metadata types selected by default in the Exclude From Auto Resolve picklist field in the Promotion record.
  2. In a specific promotion:
    If you want to override the default metadata types excluded from auto-resolve in the pipeline for a specific promotion, you can do so by editing the Exclude From Auto Resolve picklist field in the Promotion record:
    It doesn't matter if the pipeline linked to the promotion has different Exclude From Auto Resolve values. The values of this picklist field in the Promotion record have priority over the equivalent picklist field values in the related pipeline.
Excluding Additional Metadata Types from Auto Resolve

If you would like to manually resolve conflicts for other metadata types, such as layouts or email templates, and these values are not available in the Exclude from Auto Resolve picklist field, you can to add these values to the Auto Resolve Exceptions global value set and then select them in the Exclude From Auto Resolve picklist field:

How Does the Online Conflict Resolution Feature Work?

When Copado detects a conflict in a file that belongs to a metadata type that has been excluded from auto-resolve, the following actions occur:

  1. The merge of the user story feature branch into the promotion branch is stopped.
  2. The conflicting files are attached to the Promotion record. 
  3. The status of the promotion changes to Merge Conflict.
  4. An email that contains the list of conflicting files is sent to the user that is executing the promotion.
  5. The Review Merge Conflict button appears on the promotion layout:

When you click on Review Merge Conflict, you are redirected to the conflict resolution page, where you can see the list of files that have a conflict. For each conflict, you can choose to let Copado auto-resolve a specific file by clicking on Auto Resolve or click on Resolve Manually to manually resolve the conflict:

If your branches are not in sync, you may find conflicts in files that are not part of the commit. These files will have the Auto-Resolve option selected by default so that you can focus on resolving the actual conflicts in your commit.

Disabling the Auto-Resolve Functionality

If you want to prevent users from using the Auto Resolve option, you can enable the Disable Auto-Resolve checkbox. To do this, follow the steps below:

  1. Navigate to Setup > Custom Settings.
  2. Click on Manage next to Personal Settings.
  3. Click on Edit next to the name of the user or profile you want to edit the settings for.
  4. Select the Disable Auto-Resolve checkbox and click on Save:


On the conflict resolution page, the Auto-Resolve button will be greyed out, and a tooltip will be displayed to let the user know the auto-resolve feature has been disabled by their system administrator:

Manually Resolving Conflicts

To edit a text file, click on the name of the file or on Resolve Manually:  

The merge conflict resolution panel will display the conflicting lines. If you want to see the extended lines, click on the dots.

To resolve a conflict simply click on the arrows. Once the conflict has been resolved, click on Save. A green check will be added next to the name of the attachment and the Resolve Manually option will be selected:

Once the files have been marked as resolved or auto resolved, click on Create Deployment. The page is then redirected to the promotion page to create a new promotion deployment that triggers the feature branch merge process:

If the user doesn’t have the right permissions to execute a deployment, the deployment won’t be created and a warning message will be displayed. In-house or external developers can resolve conflicts but are unable to deploy if the right license or permission has not been assigned to their user.

After clicking on Submit, the promotion deployment is created again and Copado will use the file version of the resolved file(s) when merging the user story's feature branch into the promotion branch. If files are flagged as auto-resolved, Copado will automatically resolve these files when performing the merge.

Once the promotion is completed, you can click on Review Merge Conflict to check the conflicts that were resolved during the promotion process.


How did we do?