CommunityDevOps ExchangePartners
Articles
5/22/2023
10 minutes

Best Practices to Prevent Merge Conflicts with Copado 1 Platform

Written by
Jen Nelson
Table of contents

If you have worked as a Developer (Pro-Coder) or a Declarative Administrator (Low-Coder), you know that Merge Conflicts are always a risk.

Take a simple Salesforce page layout, for example. If you are editing a page layout in Salesforce at the exact same time that another Salesforce user is editing the same page layout, one of you will get an error upon save that the version of the page layout has been changed by another user.

That is a merge conflict, directly in the Salesforce platform.  The Copado 1 Platform provides multiple features to enable merge conflict resolution with Git (Version Control) (Conflict Resolution - Metadata Format Pipelines and Conflict Resolution - Source Format Pipelines), but the goal of this blog post is to make recommendations for proactive merge conflict prevention, through process.

Here are 5 Best Practices for Merge Conflict Prevention

  • Scrum Planning - Minimize User Story Metadata Overlap within a common development period (e.g. a Sprint).
  • Say, for example, the theme of the current sprint is enhancing the Sales Team’s opportunity pipeline management. You may assign developers and declarative administrators to work on new fields and new or updated Salesforce automations (SFA).
    But for the components with broad interdependencies, such as Layouts, Lightning Pages or Permission Sets, and perhaps even complex, multi-object Apex or Lightning Web Components, consider assigning a dedicated contributor to mitigate overlap and minimize the risk of merge conflicts.
  • Inter- and Intra-Squad Collaboration - Proven mitigators to merge conflict prevention are awareness, communication and collaboration.
  • Sometimes user story metadata overlap is simply unavoidable; however, awareness, communication and collaboration amongst the DevOps squads and team members are not.
  • Encourage and facilitate opportunities for the DevOps squads and team members to discuss planned work for the upcoming sprint, taking care to discuss known overlap and its impact, and to collaborate throughout the sprint to minimize the risk of merge conflicts.
  • Be mindful that two different Squads may overlap, even if they are dedicated to different groups of business users all utilizing the same Production Org; standard objects like Accounts and Contacts may impact many other metadata components in the common Production Org.
  • Strive for traceability of discrete metadata changes back to the documented functional requirements on each user story, which will also help raise the visibility of overlap.
  • Leverage Quality Gates designed for proactive Merge Conflict Prevention - for example, Git Pull Requests and the Copado User Story Overlap Awareness feature.
  • Both the Git Pull Request feature and the Copado User Story Overlap Awareness feature provide teams the opportunity to proactively identify potential merge conflicts and make decisions about how to ultimately avoid them, either through redesign or via coordination and separation of DevOps duties.
  • Back Promote early and often - Consider the below sample pipeline and the fact that work-in-progress from the four lowest environments get merged as it is promoted/deployed up to DevMerge.

  • Leverage Copado Continuous Delivery and Connection Behaviors (Metadata Format Pipelines) with a single (default) Connection Behavior or discreet (override) Connection Behaviors with Scheduled Back Promotions or Copado Continuous Delivery Rules (Source Format Pipelines) with Scheduled Back Promotion Automations to ensure the lowest environments are kept in sync with one another and to prevent merge conflicts for unknown changes from other contributors.
  • Ensure that all DevOps team members are aware of the back promotion schedule so that they have an opportunity to commit to work in progress in advance of the scheduled back promotion.
  • If individual DevOps team members prefer to manually retrieve the back promotions of changes from other contributors, strongly encourage them to do so on a frequent and regular cadence. Waiting to back promote until stories have passed QA or UAT introduces a higher risk of unexpected changes from other contributors causing merge conflicts with your own work-in-progress.
  • The same recommendations apply to Hotfix. Since the intent of Hotfix is to be an emergency recovery environment when a high-priority defect is introduced into Production, it is important to ensure that Hotfix is as closely synchronized with Production as possible.
  • Finally, given the fact that all feature branches are typically created out of the main/master branch, it is also important that any Hotfix changes promoted/deployed to Production are rapidly (ideally, automatically) back promoted down to all lower environments, not only to mitigate merge conflicts, but also to help inform so that new work-in-progress coming up the pipeline does not conflict with, or worse, overwrite, the Hotfix changes in the upper environments.
  • Monitor, Assess and Revise Processes - DevOps is a cyclical evolution; it is not linear.
  • DevOps teams are encouraged to monitor and review their DevOps outcomes, for example, to identify environments with the highest occurrence of merge conflicts and determine a go-forward plan for further merge conflict prevention.
  • The free Copado Labs Copado Operations Metrics reports pack includes a report of merge conflicts by destination environment and is an easy way to identify the environments in the pipeline with the highest frequency of merge conflicts.

Conclusion

DevOps and Merge Conflict Prevention are no different than driving a car on a busy highway in the snow. We can have all the top-notch tools (paved roads, well-marked lane lines, guardrails, snow tires, seatbelts, speed limits). But if the drivers on the road do not follow best practices and have good driving processes (obey the speed limit, signal when changing lanes, follow at a safe distance, turn on your headlights when visibility is compromised), then there is a far greater likelihood of a collision.

The Copado 1 DevOps Platform includes an integrated set of products and features to not only support your technology but also enable people and processes.

What’s next?

Review the Copado User Toolkit Webinar Series for additional recommendations, for example, Copado User Toolkit Episode 2: Eliminate Merge Conflicts with Back Promotions.

About The Author

Jen Nelson is a 20-year veteran of the Salesforce ecosystem, a current Salesforce MVP Hall of Fame member and has 30+ years experience in DevOps. Jen has been with Copado for 4 years and is the Director of Product Technical Enablement.


Book a demo

About The Author

Director, Product Enablement

Jen Nelson is a 20-year veteran of the Salesforce ecosystem, a current Salesforce MVP Hall of Fame member and has 30+ years experience in DevOps. Jen has been with Copado for 4 years and is the Director of Product Technical Enablement.

Copado and Wipro Team Up to Transform Salesforce DevOps
DevOps Needs for Operations in China: Salesforce on Alibaba Cloud
What is Salesforce Deployment Automation? How to Use Salesforce Automation Tools
Maximizing Copado's Cooperation with Essential Salesforce Instruments
Future Trends in Salesforce DevOps: What Architects Need to Know
From Chaos to Clarity: Managing Salesforce Environment Merges and Consolidations
Enhancing Customer Service with CopadoGPT Technology
What is Efficient Low Code Deployment?
Copado Launches Test Copilot to Deliver AI-powered Rapid Test Creation
Cloud-Native Testing Automation: A Comprehensive Guide
A Guide to Effective Change Management in Salesforce for DevOps Teams
Building a Scalable Governance Framework for Sustainable Value
Copado Launches Copado Explorer to Simplify and Streamline Testing on Salesforce
Exploring Top Cloud Automation Testing Tools
Master Salesforce DevOps with Copado Robotic Testing
Exploratory Testing vs. Automated Testing: Finding the Right Balance
A Guide to Salesforce Source Control
A Guide to DevOps Branching Strategies
Family Time vs. Mobile App Release Days: Can Test Automation Help Us Have Both?
How to Resolve Salesforce Merge Conflicts: A Guide
Copado Expands Beta Access to CopadoGPT for All Customers, Revolutionizing SaaS DevOps with AI
Is Mobile Test Automation Unnecessarily Hard? A Guide to Simplify Mobile Test Automation
From Silos to Streamlined Development: Tarun’s Tale of DevOps Success
Simplified Scaling: 10 Ways to Grow Your Salesforce Development Practice
What is Salesforce Incident Management?
What Is Automated Salesforce Testing? Choosing the Right Automation Tool for Salesforce
Copado Appoints Seasoned Sales Executive Bob Grewal to Chief Revenue Officer
Business Benefits of DevOps: A Guide
Copado Brings Generative AI to Its DevOps Platform to Improve Software Development for Enterprise SaaS
Celebrating 10 Years of Copado: A Decade of DevOps Evolution and Growth
Copado Celebrates 10 Years of DevOps for Enterprise SaaS Solutions
5 Reasons Why Copado = Less Divorces for Developers
What is DevOps? Build a Successful DevOps Ecosystem with Copado’s Best Practices
Scaling App Development While Meeting Security Standards
5 Data Deploy Features You Don’t Want to Miss
Top 5 Reasons I Choose Copado for Salesforce Development
How to Elevate Customer Experiences with Automated Testing
Getting Started With Value Stream Maps
Copado and nCino Partner to Provide Proven DevOps Tools for Financial Institutions
Unlocking Success with Copado: Mission-Critical Tools for Developers
How Automated Testing Enables DevOps Efficiency
How to Keep Salesforce Sandboxes in Sync
How to Switch from Manual to Automated Testing with Robotic Testing
Best Practices to Prevent Merge Conflicts with Copado 1 Platform
Software Bugs: The Three Causes of Programming Errors
How Does Copado Solve Release Readiness Roadblocks?
Why I Choose Copado Robotic Testing for my Test Automation
How to schedule a Function and Job Template in DevOps: A Step-by-Step Guide
Delivering Quality nCino Experiences with Automated Deployments and Testing
Best Practices Matter for Accelerated Salesforce Release Management
Maximize Your Code Quality, Security and performance with Copado Salesforce Code Analyzer
Upgrade Your Test Automation Game: The Benefits of Switching from Selenium to a More Advanced Platform
Three Takeaways From Copa Community Day
Cloud Native Applications: 5 Characteristics to Look for in the Right Tools
Using Salesforce nCino Architecture for Best Testing Results
How To Develop A Salesforce Testing Strategy For Your Enterprise
What Is Multi Cloud: Key Use Cases and Benefits for Enterprise Settings
5 Steps to Building a Salesforce Center of Excellence for Government Agencies
Salesforce UI testing: Benefits to Staying on Top of Updates
Benefits of UI Test Automation and Why You Should Care
Types of Salesforce Testing and When To Use Them
Copado + DataColada: Enabling CI/CD for Developers Across APAC
What is Salesforce API Testing and It Why Should Be Automated
Machine Learning Models: Adapting Data Patterns With Copado For AI Test Automation
Automated Testing Benefits: The Case For As Little Manual Testing As Possible
Beyond Selenium: Low Code Testing To Maximize Speed and Quality
UI Testing Best Practices: From Implementation to Automation
How Agile Test Automation Helps You Develop Better and Faster
Salesforce Test Cases: Knowing When to Test
DevOps Quality Assurance: Major Pitfalls and Challenges
11 Characteristics of Advanced Persistent Threats (APTs) That Set Them Apart
7 Key Compliance Regulations Relating to Data Storage
7 Ways Digital Transformation Consulting Revolutionizes Your Business
6 Top Cloud Security Trends
API Management Best Practices
Applying a Zero Trust Infrastructure in Kubernetes
Building a Data Pipeline Architecture Based on Best Practices Brings the Biggest Rewards
CI/CD Methodology vs. CI/CD Mentality: How to Meet Your Workflow Goals
DevOps to DevSecOps: How to Build Security into the Development Lifecycle
DevSecOps vs Agile: It’s Not Either/Or
How to Create a Digital Transformation Roadmap to Success
Infrastructure As Code: Overcome the Barriers to Effective Network Automation
Leveraging Compliance Automation Tools to Mitigate Risk
Moving Forward with These CI/CD Best Practices
Top 3 Data Compliance Challenges of Tomorrow and the Solutions You Need Today