SlideShare a Scribd company logo
1 of 40
Download to read offline
DX@Scale
Optimising Salesforce Development
and Deployment for Large Scale
Projects
Azlam Abdulsalam
Technical Architect specialising in
Salesforce DevOps
@azlus
Ramzi Akremi
Software Engineering on Salesforce
@rakremi
Safe Harbour
Opinions are our own
They are not final as we are still
experimenting and learning from our
mistakes…
But so far, so good!
Release 1
Service Cloud
Core CRM
Case Management
Knowledge Base & Communities
Account Team Management
Core business domains
Telephony
Livechat
AWS
Sendgrid
9 inbound integrations
2 outbound integrations
25 teams members
Adelaide
Melbourne
Sydney
Manila
Cebu
Entirely remote
29
Artefacts
(packages and metadata)
~1300 Pull requests
~1800 Metadata Types
363 Apex Classes
415 Unit Tests
30
minutes
Few principles we set at the beginning
Right amount of design upfront, listen to our
pains and act accordingly
Each feature is developed in an individual scratch
org
Keep an entire build below 30 minutes
Zero recurring manual steps
Be adamant about technical debt
Fully Traceable Artefacts
Full Deployment to an environment within 1 hour
O(n)
Toolbox
Individual scratch org for each feature
Scratch org creation:
80 minutes
Enter the scratch org pool
Individual scratch org for each feature
Scratch org creation:
80 minutes
With scratch org pool:
20 seconds
Keep complexity at bay
Roadmap
April 2020 Oct 2020 Feb 2021 Jun 2021
Discovery
MarketingRelease2
SalesCloud/CPQ
MarketingRelease3
Billing
Jun 2020
COVID
TechnicalRelease
MarketingRelease1
ServiceCloud
• If it hits master, it goes to production
(eventually)
• We never use long-lived branches
• We feature toggle by not deploying
the artefact(s)
• We haven’t yet seen the need for a
finer grained feature toggling
approach
Our current branching model
master
feature-x
release/1.0release/0.3
Our current branching model
master
feature-x
release/1.0release/0.3
If it hits master, it’s goes to production (eventually)
This means that everything that hits master is
validated (from a business perspective as well as a
technical)
Adamant about technical debt
Business validation in Developer scratch org
Merge conflicts (if any), are resolved before the
PR is validated
Dedicated ephemeral CI environment, where we
execute:
Static code analysis using PMD (and CodeScan)
Validate packaging coverage for metadata
Validate test coverage for individual packages by
automatically detecting test classes in a package
Validate Data Packages
Deploy to a sandbox before building the package
to check upgrade behaviour (source deploy)
Pull Requests validation
So far we have…
Solved the issue where it takes a lot
of time to spin up a scratch org
Developers are not slowed down
A pull request process that can take
quite some time in
Build
Deployment
Tests
Optimise Build Stage
• Build only modified packages
• Build all other packages depending on
modified package
• Build packages in parallel if it is possible
• Do not build packages when their
dependencies are failing
• Discover/resolve dependencies between
packages automatically
Model your path to production
• Utilize a system that allows to model
your entire path to production including
your manual steps, approval checks etc.
• Only deploy the artefacts that are
changed by probing against the org, so
we can keep the release definition intact
• Generate automated changelogs to
update stakeholders to decide on the
release
Parallelism and dependencies
The bigger the artefact:
• The longer it takes to build,
validate, test, deploy
• The more likely it will need a
rebuild upon modification
• The more dependencies it will
likely have
S(olid) applied at the artefact level
High level structure/Our current structure
Business features/capabilities
1 mono-repo
i.e.
Case Management
Telephony
…
Mix unlocked, org dependent, source artefacts
Technical capabilities
1 mono-repo
i.e.
Generic inbound event handler
Trigger Framework
…
Several unlocked packages
Technical libraries
Several repos
I.e.
Rest Framework
Logging
…
Several unlocked packages
src-temp -> ‘default’, staging area to decide the location for
new metadata, src-temp will not be deployed to any
environments other than CI
Don’t limit yourself by mono-repo, Move packages to other
repos by monitoring change frequency and dependency
Everything lives in the repo, including manual steps, scripts,
environment settings and get the same importance as any other
metadata
We found repo per package to be painful, especially using git
submodules to link during the push to development
environment (scratch org)
Profiles
Layouts
Triggers
Few dependency magnets and how we dealt
with them
Profiles
We use them only when we have to
So far we have only two profiles
• A copy of the standard user
• Admin profile
We use permission sets instead
Permission sets are within the artefact
Layouts
Option 1
They serve one clearly identified business domain
We package them alongside the other metadata
Option 2
They span across several business domains
We separate them and usually we don’t package
(unlock) them
Example:
• Contact Layout
• Account Layout
• …
Triggers
Salesforce Best Practice
Only one trigger per object
Challenge
What if the business logic spans across multiple
artefacts?
Triggers
29
Artefacts
(packages and metadata)
That’s how we ended up with
Unlocked package
Org dependent package
Source package
Changeset
(In this order)
and Data Package
Which packaging method?
What about unit tests?
I/O are usually the reason why tests are slow
Every time a unit test requires the database, there
is an impact in terms of speed (µs -> ms)
Technical debt is the second major reason for
slow tests
APEX is object oriented
SOLID principles
The database is an “implementation detail”
(i.e. Do not sprinkle your code with DML
statements and queries)
Mock the database calls when performing Unit
tests
Yes but it is Salesforce, I
need to access the DB
Unit Tests
415 Unit Tests Execution Time ~2-5 minutes
Coverage ~90%
Average of 226 Builds/week
Average of 72 package creation/week
One full build takes 25 minutes
8 environments + (several training environments)
30 minutes for a full deployment to production org
Our results so far
Azlam Abdulsalam
Technical Architect specialising in
Salesforce DevOps
@azlus
Ramzi Akremi
Software Engineering on Salesforce
@rakremi
Thank You!
https://www.npmjs.com/package/sfpowerkit https://dxatscale.gitbook.io/sfpowerscripts/

More Related Content

Similar to DX@Scale: Optimizing Salesforce Development and Deployment for large scale projects

DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroPaul Boos
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Enkitec
 
SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal infoSynapseindiappsdevelopment
 
Devops - why, what and how?
Devops - why, what and how?Devops - why, what and how?
Devops - why, what and how?Malinda Kapuruge
 
Chicago Code Camp 2014 TFS Care and Feeding
Chicago Code Camp 2014   TFS Care and FeedingChicago Code Camp 2014   TFS Care and Feeding
Chicago Code Camp 2014 TFS Care and FeedingAngela Dugan
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for youAmbientia
 
Unit Testing Full@
Unit Testing Full@Unit Testing Full@
Unit Testing Full@Alex Borsuk
 
That conference tfs care and feeding
That conference   tfs care and feedingThat conference   tfs care and feeding
That conference tfs care and feedingAngela Dugan
 
From Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auFrom Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auevanbottcher
 
SFDC Deployments
SFDC DeploymentsSFDC Deployments
SFDC DeploymentsSujit Kumar
 
Automate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSAutomate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSThoughtworks
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...garrett honeycutt
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedJoão Pedro Martins
 
DevOps and Build Automation
DevOps and Build AutomationDevOps and Build Automation
DevOps and Build AutomationHeiswayi Nrird
 
Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Mirco Hering
 
Automate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSAutomate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSAnand Bagmar
 
Seven habits of effective devops - DevOps Day - 02/02/2017
Seven habits of effective devops - DevOps Day - 02/02/2017Seven habits of effective devops - DevOps Day - 02/02/2017
Seven habits of effective devops - DevOps Day - 02/02/2017Clara Feuillet
 
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...Databricks
 

Similar to DX@Scale: Optimizing Salesforce Development and Deployment for large scale projects (20)

DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
Best Practices for Enterprise Continuous Delivery of Oracle Fusion Middlewa...
Best Practices for Enterprise Continuous Delivery of Oracle Fusion Middlewa...Best Practices for Enterprise Continuous Delivery of Oracle Fusion Middlewa...
Best Practices for Enterprise Continuous Delivery of Oracle Fusion Middlewa...
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal info
 
Devops - why, what and how?
Devops - why, what and how?Devops - why, what and how?
Devops - why, what and how?
 
Chicago Code Camp 2014 TFS Care and Feeding
Chicago Code Camp 2014   TFS Care and FeedingChicago Code Camp 2014   TFS Care and Feeding
Chicago Code Camp 2014 TFS Care and Feeding
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for you
 
Unit Testing Full@
Unit Testing Full@Unit Testing Full@
Unit Testing Full@
 
That conference tfs care and feeding
That conference   tfs care and feedingThat conference   tfs care and feeding
That conference tfs care and feeding
 
From Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auFrom Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.au
 
SFDC Deployments
SFDC DeploymentsSFDC Deployments
SFDC Deployments
 
Automate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSAutomate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaS
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
 
DevOps and Build Automation
DevOps and Build AutomationDevOps and Build Automation
DevOps and Build Automation
 
Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015
 
Automate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaSAutomate across Platform, OS, Technologies with TaaS
Automate across Platform, OS, Technologies with TaaS
 
Seven habits of effective devops - DevOps Day - 02/02/2017
Seven habits of effective devops - DevOps Day - 02/02/2017Seven habits of effective devops - DevOps Day - 02/02/2017
Seven habits of effective devops - DevOps Day - 02/02/2017
 
Agile testing
Agile testingAgile testing
Agile testing
 
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
 

More from Paris Salesforce Developer Group

La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !Paris Salesforce Developer Group
 
Scratch orgs...vous pensiez en avoir terminé avec les sandboxes ?
Scratch orgs...vous pensiez en avoir terminé avec les sandboxes ?Scratch orgs...vous pensiez en avoir terminé avec les sandboxes ?
Scratch orgs...vous pensiez en avoir terminé avec les sandboxes ?Paris Salesforce Developer Group
 
Mon Expérience avec le Certified Technical Architect Review Board
 Mon Expérience avec le Certified Technical Architect Review Board Mon Expérience avec le Certified Technical Architect Review Board
Mon Expérience avec le Certified Technical Architect Review BoardParis Salesforce Developer Group
 
Pratiques administration avancées et techniques de développement
Pratiques administration avancées et techniques de développementPratiques administration avancées et techniques de développement
Pratiques administration avancées et techniques de développementParis Salesforce Developer Group
 
Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15
Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15
Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15Paris Salesforce Developer Group
 
Versionning et travail en équipe avec Salesforce - 27/11/2014
Versionning et travail en équipe avec Salesforce - 27/11/2014Versionning et travail en équipe avec Salesforce - 27/11/2014
Versionning et travail en équipe avec Salesforce - 27/11/2014Paris Salesforce Developer Group
 
Paris Salesforce Developer Group - 16 09 2014 - Summer '14
Paris Salesforce Developer Group - 16 09 2014 - Summer '14Paris Salesforce Developer Group - 16 09 2014 - Summer '14
Paris Salesforce Developer Group - 16 09 2014 - Summer '14Paris Salesforce Developer Group
 

More from Paris Salesforce Developer Group (19)

Pour Noël, devenez chrome extensioniste!
Pour Noël, devenez chrome extensioniste!Pour Noël, devenez chrome extensioniste!
Pour Noël, devenez chrome extensioniste!
 
GraphQL (la nouvelle API de référence de Salesforce ?!)
GraphQL (la nouvelle API de référence de Salesforce ?!)GraphQL (la nouvelle API de référence de Salesforce ?!)
GraphQL (la nouvelle API de référence de Salesforce ?!)
 
La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
 
Introduction à la plateforme Anypoint de MuleSoft
Introduction à la plateforme Anypoint de MuleSoftIntroduction à la plateforme Anypoint de MuleSoft
Introduction à la plateforme Anypoint de MuleSoft
 
Release spring '22 - Community Groups français
Release spring '22 - Community Groups françaisRelease spring '22 - Community Groups français
Release spring '22 - Community Groups français
 
Scratch orgs...vous pensiez en avoir terminé avec les sandboxes ?
Scratch orgs...vous pensiez en avoir terminé avec les sandboxes ?Scratch orgs...vous pensiez en avoir terminé avec les sandboxes ?
Scratch orgs...vous pensiez en avoir terminé avec les sandboxes ?
 
Mon Expérience avec le Certified Technical Architect Review Board
 Mon Expérience avec le Certified Technical Architect Review Board Mon Expérience avec le Certified Technical Architect Review Board
Mon Expérience avec le Certified Technical Architect Review Board
 
Mieux acheminer les emails avec salesforce
Mieux acheminer les emails avec salesforceMieux acheminer les emails avec salesforce
Mieux acheminer les emails avec salesforce
 
Dreamforce Global Gathering
Dreamforce Global GatheringDreamforce Global Gathering
Dreamforce Global Gathering
 
Getting started with Salesforce DX
Getting started with Salesforce DXGetting started with Salesforce DX
Getting started with Salesforce DX
 
Pratiques administration avancées et techniques de développement
Pratiques administration avancées et techniques de développementPratiques administration avancées et techniques de développement
Pratiques administration avancées et techniques de développement
 
Sensibilisation à la Sécurité Salesforce
Sensibilisation à la Sécurité SalesforceSensibilisation à la Sécurité Salesforce
Sensibilisation à la Sécurité Salesforce
 
Salesforce Performance hacks - Client Side
Salesforce Performance hacks - Client SideSalesforce Performance hacks - Client Side
Salesforce Performance hacks - Client Side
 
Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15
Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15
Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15
 
Meetup 06/2015 - @testsetup
Meetup 06/2015 - @testsetupMeetup 06/2015 - @testsetup
Meetup 06/2015 - @testsetup
 
Meetup Custom Metadata - 1st Part
Meetup Custom Metadata - 1st PartMeetup Custom Metadata - 1st Part
Meetup Custom Metadata - 1st Part
 
Lightning week - Paris DUG
Lightning week - Paris DUGLightning week - Paris DUG
Lightning week - Paris DUG
 
Versionning et travail en équipe avec Salesforce - 27/11/2014
Versionning et travail en équipe avec Salesforce - 27/11/2014Versionning et travail en équipe avec Salesforce - 27/11/2014
Versionning et travail en équipe avec Salesforce - 27/11/2014
 
Paris Salesforce Developer Group - 16 09 2014 - Summer '14
Paris Salesforce Developer Group - 16 09 2014 - Summer '14Paris Salesforce Developer Group - 16 09 2014 - Summer '14
Paris Salesforce Developer Group - 16 09 2014 - Summer '14
 

Recently uploaded

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

DX@Scale: Optimizing Salesforce Development and Deployment for large scale projects

  • 1. DX@Scale Optimising Salesforce Development and Deployment for Large Scale Projects Azlam Abdulsalam Technical Architect specialising in Salesforce DevOps @azlus Ramzi Akremi Software Engineering on Salesforce @rakremi
  • 2. Safe Harbour Opinions are our own They are not final as we are still experimenting and learning from our mistakes… But so far, so good!
  • 3. Release 1 Service Cloud Core CRM Case Management Knowledge Base & Communities Account Team Management Core business domains Telephony Livechat AWS Sendgrid 9 inbound integrations 2 outbound integrations
  • 5. 29 Artefacts (packages and metadata) ~1300 Pull requests ~1800 Metadata Types 363 Apex Classes 415 Unit Tests
  • 7. Few principles we set at the beginning Right amount of design upfront, listen to our pains and act accordingly Each feature is developed in an individual scratch org Keep an entire build below 30 minutes Zero recurring manual steps Be adamant about technical debt Fully Traceable Artefacts Full Deployment to an environment within 1 hour O(n)
  • 9. Individual scratch org for each feature Scratch org creation: 80 minutes
  • 10. Enter the scratch org pool
  • 11. Individual scratch org for each feature Scratch org creation: 80 minutes With scratch org pool: 20 seconds
  • 12.
  • 14. Roadmap April 2020 Oct 2020 Feb 2021 Jun 2021 Discovery MarketingRelease2 SalesCloud/CPQ MarketingRelease3 Billing Jun 2020 COVID TechnicalRelease MarketingRelease1 ServiceCloud
  • 15. • If it hits master, it goes to production (eventually) • We never use long-lived branches • We feature toggle by not deploying the artefact(s) • We haven’t yet seen the need for a finer grained feature toggling approach
  • 16. Our current branching model master feature-x release/1.0release/0.3
  • 17. Our current branching model master feature-x release/1.0release/0.3
  • 18. If it hits master, it’s goes to production (eventually) This means that everything that hits master is validated (from a business perspective as well as a technical)
  • 20. Business validation in Developer scratch org Merge conflicts (if any), are resolved before the PR is validated Dedicated ephemeral CI environment, where we execute: Static code analysis using PMD (and CodeScan) Validate packaging coverage for metadata Validate test coverage for individual packages by automatically detecting test classes in a package Validate Data Packages Deploy to a sandbox before building the package to check upgrade behaviour (source deploy) Pull Requests validation
  • 21.
  • 22. So far we have… Solved the issue where it takes a lot of time to spin up a scratch org Developers are not slowed down A pull request process that can take quite some time in Build Deployment Tests
  • 23. Optimise Build Stage • Build only modified packages • Build all other packages depending on modified package • Build packages in parallel if it is possible • Do not build packages when their dependencies are failing • Discover/resolve dependencies between packages automatically
  • 24.
  • 25. Model your path to production • Utilize a system that allows to model your entire path to production including your manual steps, approval checks etc. • Only deploy the artefacts that are changed by probing against the org, so we can keep the release definition intact • Generate automated changelogs to update stakeholders to decide on the release
  • 26. Parallelism and dependencies The bigger the artefact: • The longer it takes to build, validate, test, deploy • The more likely it will need a rebuild upon modification • The more dependencies it will likely have S(olid) applied at the artefact level
  • 27. High level structure/Our current structure Business features/capabilities 1 mono-repo i.e. Case Management Telephony … Mix unlocked, org dependent, source artefacts Technical capabilities 1 mono-repo i.e. Generic inbound event handler Trigger Framework … Several unlocked packages Technical libraries Several repos I.e. Rest Framework Logging … Several unlocked packages
  • 28. src-temp -> ‘default’, staging area to decide the location for new metadata, src-temp will not be deployed to any environments other than CI Don’t limit yourself by mono-repo, Move packages to other repos by monitoring change frequency and dependency Everything lives in the repo, including manual steps, scripts, environment settings and get the same importance as any other metadata We found repo per package to be painful, especially using git submodules to link during the push to development environment (scratch org)
  • 30. Profiles We use them only when we have to So far we have only two profiles • A copy of the standard user • Admin profile We use permission sets instead Permission sets are within the artefact
  • 31. Layouts Option 1 They serve one clearly identified business domain We package them alongside the other metadata Option 2 They span across several business domains We separate them and usually we don’t package (unlock) them Example: • Contact Layout • Account Layout • …
  • 32. Triggers Salesforce Best Practice Only one trigger per object Challenge What if the business logic spans across multiple artefacts?
  • 35. Unlocked package Org dependent package Source package Changeset (In this order) and Data Package Which packaging method?
  • 36. What about unit tests? I/O are usually the reason why tests are slow Every time a unit test requires the database, there is an impact in terms of speed (µs -> ms) Technical debt is the second major reason for slow tests APEX is object oriented SOLID principles The database is an “implementation detail” (i.e. Do not sprinkle your code with DML statements and queries) Mock the database calls when performing Unit tests
  • 37. Yes but it is Salesforce, I need to access the DB
  • 38. Unit Tests 415 Unit Tests Execution Time ~2-5 minutes Coverage ~90%
  • 39. Average of 226 Builds/week Average of 72 package creation/week One full build takes 25 minutes 8 environments + (several training environments) 30 minutes for a full deployment to production org Our results so far
  • 40. Azlam Abdulsalam Technical Architect specialising in Salesforce DevOps @azlus Ramzi Akremi Software Engineering on Salesforce @rakremi Thank You! https://www.npmjs.com/package/sfpowerkit https://dxatscale.gitbook.io/sfpowerscripts/