Online Conflict Resolution
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.
The Online Conflict Resolution feature can be activated in two different places: :
- In your pipeline:
- Edit the Pipeline record.
- Select the metadata types you want to manually resolve conflicts for in the Exclude From Auto Resolve picklist field::
- 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.
- 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:
- The merge of the user story feature branch into the promotion branch is stopped.
- The conflicting files are attached to the Promotion record.
- The status of the promotion changes to Merge Conflict.
- An email that contains the list of conflicting files is sent to the user that is executing the promotion.
- 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:
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:
- Navigate to Setup > Custom Settings.
- Click on Manage next to Personal Settings.
- Click on Edit next to the name of the user or profile you want to edit the settings for.
- 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:
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.
User story promotion fails with the Online Conflict Resolution feature enabled.
Disable that particular component from the online conflict resolution. Copado will auto-resolve it and the file won't be inserted in the promotion record.