{"id":799,"date":"2023-12-05T20:55:00","date_gmt":"2023-12-05T20:55:00","guid":{"rendered":"https:\/\/fde.cat\/index.php\/2023\/12\/05\/explaining-salesforces-large-scale-migration-to-git-how-we-enhanced-developer-productivity\/"},"modified":"2023-12-05T20:55:00","modified_gmt":"2023-12-05T20:55:00","slug":"explaining-salesforces-large-scale-migration-to-git-how-we-enhanced-developer-productivity","status":"publish","type":"post","link":"https:\/\/fde.cat\/index.php\/2023\/12\/05\/explaining-salesforces-large-scale-migration-to-git-how-we-enhanced-developer-productivity\/","title":{"rendered":"Explaining Salesforce\u2019s Large-Scale Migration to Git: How We Enhanced Developer Productivity"},"content":{"rendered":"<p><em>By Patrick Calahan and Scott Nyberg<\/em><\/p>\n<p>As new developer productivity technologies emerge, small and nimble enterprises with newer codebases swiftly embrace innovation. Conversely, larger organizations, rooted in larger and aging codebases, face obstacles replacing legacy technologies.<\/p>\n<p>Salesforce faced such a challenge with its primary Source Code Management (SCM) system. For nearly two decades, the codebase for Salesforce\u2019s central \u2018Core\u2019 application server was stored in the Perforce SCM. In 2021, Salesforce committed to enhance the efficiency of its internal developers by migrating it to a modern SCM powerhouse: Git.<\/p>\n<p>Just two years later, the migration is nearly complete, signifying a major stride toward implementing a highly agile and efficient development environment.<\/p>\n<p><em>Patrick shares his excitement about the Git migration.<\/em><\/p>\n<p><strong>How was the Git migration challenging?<\/strong><\/p>\n<div class=\"wp-block-group is-layout-constrained wp-container-1 wp-block-group-is-layout-constrained\">\n<p>Despite a long-standing desire to bring Git\u2019s advantages to internal developers, the sheer size and complexity of the Core codebase historically posed significant barriers including:<\/p>\n<p><strong>Many files<\/strong>. Surpassing 30 million files and featuring a footprint approaching 30 gigabytes, the challenge was optimizing common operations like \u2018git status\u2019 at this scale.<\/p>\n<p><strong>Binary files<\/strong>. The core codebase includes hundreds of thousands of binary files. That introduced complexities as Git\u2019s proficiency with such files is limited \u2014 creating storage and management issues.<\/p>\n<p><strong>A long commit history<\/strong>. Core\u2019s changelist history spans decades. This sparked concerns about the scalability of particular Git operations in the wake of millions of changes in the history.<\/p>\n<p><strong>Legacy automation<\/strong>. Core development depended on dozens of internal tools and systems that were tightly coupled to Perforce. Migrating them simultaneously would have been impractical.<\/p>\n<p><strong>Numerous developers<\/strong>. The Core codebase\u2019s collaborative environment involved around 5,000 Salesforce employees. Ensuring a seamless transition for this expansive and diverse development community was key.<\/p>\n<\/div>\n<p><strong>How were Git migration challenges overcome?<\/strong><\/p>\n<p>During the migration process, several of the above challenges had relatively straightforward technical solutions. For example, <a href=\"https:\/\/git-lfs.com\/\">Git Large File Storage<\/a> effectively handled binary files, while recent improvements to Git itself, such as the <a href=\"https:\/\/git-scm.com\/docs\/git-fsmonitor--daemon\">fsmonitor<\/a> file watcher significantly improved Git\u2019s ability to manage a large number of files.<\/p>\n<p>On the other hand, contending with the specific issues posed by the army of developers and the sweeping scale of Core\u2019s supporting infrastructure necessitated a unique approach. Instead of tackling those challenges all at once, a small Salesforce team initiated the process by building a simple prototype to prove the basic feasibility of transitioning Core to Git. To meet these challenges, Salesforce developed an incremental migration strategy.<\/p>\n<p>The crux of this strategy was to apply a variant of the \u2018Strangler Pattern\u2019. In this framework, the Git repository becomes the preferred SCM going forward while Perforce remains in place and kept in sync with Git. Through a periodic sync process, Git commits were reflected as Perforce changelists, allowing the legacy automation to operate undisturbed until its eventual migration to Git. To further facilitate the transition, a proxy layer was developed to enable much of the legacy tooling to interact with Git and Perforce in an SCM-agnostic manner.<\/p>\n<p>This approach instantly accelerated developer productivity, eliminating delays resulting from a protracted migration of all automation processes.<\/p>\n<p><strong>How was the migration\u2019s success measured?<\/strong><\/p>\n<p>The incremental approach afforded opportunities for iterative enhancement, necessitating a tight feedback loop \u2014 evaluating the new system\u2019s performance, understanding developer satisfaction, and measuring actual productivity gains.<\/p>\n<div class=\"wp-block-group is-layout-constrained wp-container-2 wp-block-group-is-layout-constrained\">\n<p>Recognizing the critical role of metrics to the project\u2019s success, strategic investments were made early on:<\/p>\n<p><strong>Fine-grained metrics:<\/strong> Git\u2019s built-in, low-level \u2018trace2\u2019 diagnostic framework logs data on every Git command run on developers\u2019 machines. Salesforce anonymized and aggregated this log data to get an overview of developers\u2019 Git usage and performance.<\/p>\n<p><strong>Aggregate metrics:<\/strong> In order to measure progress, Salesforce improved its internal bug tracking system to help track aggregate improvements in its Git-based developer\u2019s velocity. Comprehensive reports and dashboards revealed an impressive 8-10% increase in overall developer productivity with Git versus Perforce.<\/p>\n<p><strong>Qualitative metrics:<\/strong> Surveys were conducted to gain insights into developers\u2019 general satisfaction and detect areas for improvement. Feedback consistently rated the Git experience \u2018good\u2019 to \u2018great\u2019.<\/p>\n<\/div>\n<p><strong>How is Git advancing developer productivity?<\/strong><\/p>\n<div class=\"wp-block-group is-layout-constrained wp-container-3 wp-block-group-is-layout-constrained\">\n<p>Git offers numerous advantages over Perforce, introducing tremendous flexibility for developers and automation systems \u2014 enabling the quick creation of temporary codeline branches and seamless switching between them. Git is a game-changer for developer productivity at Salesforce, powering several key productivity enhancements including:<\/p>\n<p><strong>Safe multitasking<\/strong>: Local branching empowers developers to easily transition between building features and fixing critical bugs.<\/p>\n<p><strong>Tighter inner loop<\/strong>: With Git, developers can commit as frequently as they want to. Frequent checkpointing helps ensure that work is never lost and that experimental drafts can be always be retrieved. This also encourages delivery of smaller, self-contained units that are easier to manage and review.<\/p>\n<p><strong>Collaboration and creativity<\/strong>: Git\u2019s flexible branching significantly enhances teamwork, enabling developers to easily share work, collaborate on features, and prototype novel solutions to difficult problems.<\/p>\n<p><strong>Left-shifted automation<\/strong>: Flexible branching also helped modernize Core\u2019s continuous integration systems. By extensively testing proposed branches prior to merging, the stability of development codelines has improved \u2014 helping developers take their efficiency to new heights.<\/p>\n<\/div>\n<p><em>Patrick highlights Salesforce Engineering\u2019s work culture.<\/em><\/p>\n<p><strong>How does Git fit into engineering\u2019s future plans?<\/strong><\/p>\n<p>Once all internal developers transition to Git, attention will focus on updating the existing infrastructure to align with Git, enabling operations under a unified SCM framework.<\/p>\n<p>The migration may also drive improvement of the release process. Git\u2019s flexible branches will help transform the current manual and error-prone procedures into an automated, continuous system. This will minimize time-consuming tasks, driving increased agility at Salesforce in response to customers\u2019 evolving needs.<\/p>\n<div class=\"wp-block-group is-layout-constrained wp-container-4 wp-block-group-is-layout-constrained\">\n<p><strong>Learn more<\/strong><\/p>\n<p>Hungry for more migration stories? <a href=\"https:\/\/engineering.salesforce.com\/automation-at-scale-migrating-200000-machines-from-centos-7-to-rhel-9\/\">Read this blog<\/a> to learn how Salesforce migrated 200,000 machines from CentOS 7 to RHEL 9<\/p>\n<p>Stay connected \u2014 join our <a href=\"https:\/\/careers.mail.salesforce.com\/w2?cid=7017y00000CRDS7AAP\">Talent Community<\/a>!<\/p>\n<p><a href=\"https:\/\/www.salesforce.com\/company\/careers\/teams\/tech-and-product\/?d=cta-tms-tp-2\">Check out our Technology and Product teams<\/a> to learn how you can get involved.<\/p>\n<\/div>\n<p>The post <a href=\"https:\/\/engineering.salesforce.com\/explaining-salesforces-large-scale-migration-to-git-how-we-enhanced-developer-productivity\/\">Explaining Salesforce\u2019s Large-Scale Migration to Git: How We Enhanced Developer Productivity<\/a> appeared first on <a href=\"https:\/\/engineering.salesforce.com\/\">Salesforce Engineering Blog<\/a>.<\/p>\n<p><a href=\"https:\/\/engineering.salesforce.com\/explaining-salesforces-large-scale-migration-to-git-how-we-enhanced-developer-productivity\/\" target=\"_blank\" class=\"feedzy-rss-link-icon\" rel=\"noopener\">Read More<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>By Patrick Calahan and Scott Nyberg As new developer productivity technologies emerge, small and nimble enterprises with newer codebases swiftly embrace innovation. Conversely, larger organizations, rooted in larger and aging codebases, face obstacles replacing legacy technologies. Salesforce faced such a challenge with its primary Source Code Management (SCM) system. For nearly two decades, the codebase&hellip; <a class=\"more-link\" href=\"https:\/\/fde.cat\/index.php\/2023\/12\/05\/explaining-salesforces-large-scale-migration-to-git-how-we-enhanced-developer-productivity\/\">Continue reading <span class=\"screen-reader-text\">Explaining Salesforce\u2019s Large-Scale Migration to Git: How We Enhanced Developer Productivity<\/span><\/a><\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-799","post","type-post","status-publish","format-standard","hentry","category-technology","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":683,"url":"https:\/\/fde.cat\/index.php\/2023\/02\/21\/what-is-the-secret-behind-increasing-salesforces-developer-velocity\/","url_meta":{"origin":799,"position":0},"title":"What is the Secret Behind Increasing Salesforce\u2019s Developer Velocity?","date":"February 21, 2023","format":false,"excerpt":"From retail to healthcare to IT and beyond, countless industries rely on software development to enhance business performance. However, to optimize software innovation and performance, companies must create enhanced environments that remove productivity blockers and deliver great experiences for developers. By empowering engineers to focus more on building new features\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":816,"url":"https:\/\/fde.cat\/index.php\/2024\/01\/23\/the-power-of-ai-strengthening-application-security-by-eliminating-secrets-in-code\/","url_meta":{"origin":799,"position":1},"title":"The Power of AI: Strengthening Application Security by Eliminating Secrets in Code","date":"January 23, 2024","format":false,"excerpt":"By Krishna Pandey and Scott Nyberg. In our \u201cEngineering Energizers\u201d Q&A series, we examine the professional journeys that have shaped Salesforce Engineering leaders. Meet Krishna Pandey, Director of Security Engineering at Salesforce. Based in Bangalore, India, his Application Security Technology (AST) team powers Salesforce\u2019s source code security program, charged with\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":751,"url":"https:\/\/fde.cat\/index.php\/2023\/08\/22\/how-is-einstein-gpt-shaping-the-future-of-salesforce-development-and-unleashing-developer-productivity\/","url_meta":{"origin":799,"position":2},"title":"How is Einstein GPT Shaping the Future of Salesforce Development and Unleashing Developer Productivity?","date":"August 22, 2023","format":false,"excerpt":"By Yingbo Zhou and Scott Nyberg In our \u201cEngineering Energizers\u201d Q&A series, we examine the professional life experiences that have shaped Salesforce Engineering leaders. Meet Yingbo Zhou, a Senior Director of Research for Salesforce AI Research, where he leads the team to develop the model for Einstein GPT for Developers\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":791,"url":"https:\/\/fde.cat\/index.php\/2023\/08\/22\/how-is-einstein-shaping-the-future-of-salesforce-development-and-unleashing-developer-productivity\/","url_meta":{"origin":799,"position":3},"title":"How is Einstein Shaping the Future of Salesforce Development and Unleashing Developer Productivity?","date":"August 22, 2023","format":false,"excerpt":"By Yingbo Zhou and Scott Nyberg In our \u201cEngineering Energizers\u201d Q&A series, we examine the professional life experiences that have shaped Salesforce Engineering leaders. Meet Yingbo Zhou, a Senior Director of Research for Salesforce AI Research, where he leads the team to develop the model for Einstein for Developers, a\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":719,"url":"https:\/\/fde.cat\/index.php\/2023\/05\/23\/automation-at-scale-migrating-200000-machines-from-centos-7-to-rhel-9\/","url_meta":{"origin":799,"position":4},"title":"Automation at Scale: Migrating 200,000 Machines from CentOS 7 to RHEL 9","date":"May 23, 2023","format":false,"excerpt":"When a legacy operating system (OS) approaches its end-of-support date, some organizations will upgrade their OS as fast as possible. Others may kick the can down the road, delaying any headaches they might encounter during the upgrade process. Six years ago, Salesforce Engineering put the pedal to the metal, migrating\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":690,"url":"https:\/\/fde.cat\/index.php\/2023\/03\/14\/how-is-salesforce-improving-everyday-developer-experiences-and-innovating-scalable-solutions\/","url_meta":{"origin":799,"position":5},"title":"How is Salesforce Improving Everyday Developer Experiences and Innovating Scalable Solutions?","date":"March 14, 2023","format":false,"excerpt":"In our \u201cEngineering Energizers\u201d Q&A series, we examine the life experiences and career paths that have shaped Salesforce engineering leaders. Meet Prianna Ahsan, a software engineering architect for MuleSoft\u2019s production engineering team. Prianna and her team enhance developer experiences by supporting cutting-edge projects, including the migration of MuleSoft onto Salesforce\u2019s\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/comments?post=799"}],"version-history":[{"count":0,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/799\/revisions"}],"wp:attachment":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/media?parent=799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/categories?post=799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/tags?post=799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}