Slide 1

Slide 1 text

#GearsetDevOpsSummit Philosophy, Challenges, and Opportunities of DevOps on Salesforce Gearset DevOps Summit 2022: Level up your Salesforce DevOps

Slide 2

Slide 2 text

#GearsetDevOpsSummit Aidan Harding Technology Director, Nebula Consulting Over 10 years working on Salesforce A few years messing around on mountain bikes A few years FPGA design PhD in Computer Science

Slide 3

Slide 3 text

#GearsetDevOpsSummit How would we describe Salesforce DevOps?

Slide 4

Slide 4 text

#GearsetDevOpsSummit How would we describe Salesforce DevOps?

Slide 5

Slide 5 text

#GearsetDevOpsSummit Let’s dive in… ●It’s not always so simple ●Learning Environments ●The only truth is production ●Don’t “cargo-cult” behaviours from elsewhere ●Some ideas, solutions and benefits

Slide 6

Slide 6 text

#GearsetDevOpsSummit The illusion of simplicity

Slide 7

Slide 7 text

#GearsetDevOpsSummit The illusion of simplicity I just want to move my code from A to B without drowning in my own tears

Slide 8

Slide 8 text

#GearsetDevOpsSummit The illusion of simplicity ● We “just” want to localise this book from US English to British English I just want to move my code from A to B without drowning in my own tears

Slide 9

Slide 9 text

#GearsetDevOpsSummit The illusion of simplicity ● We “just” want to localise this book from US English to British English ● So let’s “just” search and replace some terms e.g. pants → trousers I just want to move my code from A to B without drowning in my own tears

Slide 10

Slide 10 text

#GearsetDevOpsSummit The illusion of simplicity ● We “just” want to localise this book from US English to British English ● So let’s “just” search and replace some terms e.g. pants → trousers ● Oops! We’ve made particitrousers I just want to move my code from A to B without drowning in my own tears

Slide 11

Slide 11 text

#GearsetDevOpsSummit The illusion of simplicity ● We “just” want to localise this book from US English to British English ● So let’s “just” search and replace some terms e.g. pants → trousers ● Oops! We’ve made particitrousers I just want to move my code from A to B without drowning in my own tears

Slide 12

Slide 12 text

#GearsetDevOpsSummit Differing Learning Environments

Slide 13

Slide 13 text

#GearsetDevOpsSummit Differing Learning Environments Kind ● Feedback is unambiguous and timely ● Easy to progress by simple doing the work Wicked ● Feedback may be delayed, unclear, or absent ● Hard to progress without deliberate experimentation and reflection

Slide 14

Slide 14 text

#GearsetDevOpsSummit Differing Learning Environments Kind ● Feedback is unambiguous and timely ● Easy to progress by simple doing the work Examples ● Sports ● Games ● Linters and compilers Wicked ● Feedback may be delayed, unclear, or absent ● Hard to progress without deliberate experimentation and reflection Examples ● Parenting ● Medicine ● DevOps

Slide 15

Slide 15 text

#GearsetDevOpsSummit The real world hurts (not all complexity is accidental)

Slide 16

Slide 16 text

#GearsetDevOpsSummit The real world hurts (not all complexity is accidental) ●Salesforce sells itself on being easy to configure, so changes made directly in production are a feature not a bug

Slide 17

Slide 17 text

#GearsetDevOpsSummit The real world hurts (not all complexity is accidental) ●Salesforce sells itself on being easy to configure, so changes made directly in production are a feature not a bug ●Salesforce prioritises releasing new features over making those features deployable

Slide 18

Slide 18 text

#GearsetDevOpsSummit The real world hurts (not all complexity is accidental) ●Salesforce sells itself on being easy to configure, so changes made directly in production are a feature not a bug ●Salesforce prioritises releasing new features over making those features deployable ●Metadata is often stored as data (especially in packages)

Slide 19

Slide 19 text

#GearsetDevOpsSummit The real world hurts (not all complexity is accidental) ●Salesforce sells itself on being easy to configure, so changes made directly in production are a feature not a bug ●Salesforce prioritises releasing new features over making those features deployable ●Metadata is often stored as data (especially in packages) ●Some updates (e.g. changing the type of a field) are not atomic - they require multiple deployments

Slide 20

Slide 20 text

#GearsetDevOpsSummit The real world hurts (not all complexity is accidental) ●Salesforce sells itself on being easy to configure, so changes made directly in production are a feature not a bug ●Salesforce prioritises releasing new features over making those features deployable ●Metadata is often stored as data (especially in packages) ●Some updates (e.g. changing the type of a field) are not atomic - they require multiple deployments ●Communities (“Experiences”) and metadata god-objects (Profiles, Page Layouts, Record Types)

Slide 21

Slide 21 text

#GearsetDevOpsSummit The real world hurts (not all complexity is accidental) ●Salesforce sells itself on being easy to configure, so changes made directly in production are a feature not a bug ●Salesforce prioritises releasing new features over making those features deployable ●Metadata is often stored as data (especially in packages) ●Some updates (e.g. changing the type of a field) are not atomic - they require multiple deployments ●Communities (“Experiences”) and metadata god-objects (Profiles, Page Layouts, Record Types) ●Consultancies cannot rely on getting buy-in from all stakeholders

Slide 22

Slide 22 text

#GearsetDevOpsSummit Don’t forget the data, dummy!

Slide 23

Slide 23 text

#GearsetDevOpsSummit #GearsetDevOpsSummit The source of truth

Slide 24

Slide 24 text

#GearsetDevOpsSummit #GearsetDevOpsSummit The source of truth ●https://developer.salesforce.com/d ocs/metadata-coverage/56

Slide 25

Slide 25 text

#GearsetDevOpsSummit #GearsetDevOpsSummit The source of truth ●https://developer.salesforce.com/d ocs/metadata-coverage/56

Slide 26

Slide 26 text

#GearsetDevOpsSummit #GearsetDevOpsSummit The source of truth ●https://developer.salesforce.com/d ocs/metadata-coverage/56

Slide 27

Slide 27 text

#GearsetDevOpsSummit #GearsetDevOpsSummit The source of truth ●https://developer.salesforce.com/d ocs/metadata-coverage/56 ●At Nebula, we sync 24 metadata items in our CI (about 4%)

Slide 28

Slide 28 text

#GearsetDevOpsSummit What is truth? Plato’s cave

Slide 29

Slide 29 text

#GearsetDevOpsSummit What is truth? Plato’s cave

Slide 30

Slide 30 text

#GearsetDevOpsSummit What is truth? Plato’s cave Source control

Slide 31

Slide 31 text

#GearsetDevOpsSummit What is truth? Plato’s cave Source control CI

Slide 32

Slide 32 text

#GearsetDevOpsSummit What is truth? Plato’s cave Source control CI Production

Slide 33

Slide 33 text

#GearsetDevOpsSummit What is truth? Plato’s cave Source control CI Production Devs 😢

Slide 34

Slide 34 text

#GearsetDevOpsSummit Source control is truth?

Slide 35

Slide 35 text

#GearsetDevOpsSummit Source control is truth?

Slide 36

Slide 36 text

#GearsetDevOpsSummit Source control is truth? ● It only contains a fraction of the metadata

Slide 37

Slide 37 text

#GearsetDevOpsSummit Source control is truth? ● It only contains a fraction of the metadata ● It can miss changes made directly in production

Slide 38

Slide 38 text

#GearsetDevOpsSummit Source control is truth? ● It only contains a fraction of the metadata ● It can miss changes made directly in production ● Changes merged into main could still fail to deploy to Production

Slide 39

Slide 39 text

#GearsetDevOpsSummit Source control is truth? ● It only contains a fraction of the metadata ● It can miss changes made directly in production ● Changes merged into main could still fail to deploy to Production ● Source control = truth is a leaky abstraction

Slide 40

Slide 40 text

#GearsetDevOpsSummit #GearsetDevOpsSummit Cargo cults

Slide 41

Slide 41 text

#GearsetDevOpsSummit #GearsetDevOpsSummit Cargo cults You ain’t Google (unless you actually are?)

Slide 42

Slide 42 text

#GearsetDevOpsSummit #GearsetDevOpsSummit Cargo cults ●Processes become meaningless without the the intentions behind them You ain’t Google (unless you actually are?)

Slide 43

Slide 43 text

#GearsetDevOpsSummit #GearsetDevOpsSummit Cargo cults ●Processes become meaningless without the the intentions behind them ●“Individuals and interactions over processes and tools” You ain’t Google (unless you actually are?)

Slide 44

Slide 44 text

#GearsetDevOpsSummit #GearsetDevOpsSummit Cargo cults ●Processes become meaningless without the the intentions behind them ●“Individuals and interactions over processes and tools” ●DevOps process, tools, and metrics are a menu, not computer game levels You ain’t Google (unless you actually are?)

Slide 45

Slide 45 text

#GearsetDevOpsSummit WWII in Melanesia

Slide 46

Slide 46 text

#GearsetDevOpsSummit WWII in Melanesia

Slide 47

Slide 47 text

#GearsetDevOpsSummit Copy the symbols

Slide 48

Slide 48 text

#GearsetDevOpsSummit Copy the symbols

Slide 49

Slide 49 text

#GearsetDevOpsSummit Looks about right… but no signal?

Slide 50

Slide 50 text

#GearsetDevOpsSummit e.g. Deployment frequency

Slide 51

Slide 51 text

#GearsetDevOpsSummit e.g. Deployment frequency

Slide 52

Slide 52 text

#GearsetDevOpsSummit e.g. Deployment frequency ●You deploy multiple times per day? But what does that even mean?

Slide 53

Slide 53 text

#GearsetDevOpsSummit e.g. Deployment frequency ●You deploy multiple times per day? But what does that even mean? ●If a feature is “in production” but no-one is using it, is it even in production?

Slide 54

Slide 54 text

#GearsetDevOpsSummit e.g. Deployment frequency ●You deploy multiple times per day? But what does that even mean? ●If a feature is “in production” but no-one is using it, is it even in production? ●“When a measure becomes a target, it ceases to be a good measure.” [1] ○ [1] “Goodhart’s Law” Strathern, Marilyn (1997). "'Improving ratings': audit in the British University system". European Review. John Wiley & Sons. 5 (3): 305–321

Slide 55

Slide 55 text

#GearsetDevOpsSummit Well, this is depressing How about something more constructive?

Slide 56

Slide 56 text

#GearsetDevOpsSummit Unlocked Packaging

Slide 57

Slide 57 text

#GearsetDevOpsSummit Unlocked Packaging

Slide 58

Slide 58 text

#GearsetDevOpsSummit Unlocked Packaging Clean separation of functional areas Package development really is source- driven All Salesforce tooling Org-dependent can build on-top of messy code Parallel work is easy

Slide 59

Slide 59 text

#GearsetDevOpsSummit Unlocked Packaging Clean separation of functional areas Package development really is source- driven All Salesforce tooling Org-dependent can build on-top of messy code Parallel work is easy Not everything is packageable Not great for customising standard clouds Hard to migrate to from a messy codebase Can be hard to manage dependencies Sometimes requires dependency injection Time to start working can be long

Slide 60

Slide 60 text

#GearsetDevOpsSummit #GearsetDevOpsSummit Production is truth

Slide 61

Slide 61 text

#GearsetDevOpsSummit #GearsetDevOpsSummit Production is truth So let’s work with it

Slide 62

Slide 62 text

#GearsetDevOpsSummit Production is truth

Slide 63

Slide 63 text

#GearsetDevOpsSummit Production is truth

Slide 64

Slide 64 text

#GearsetDevOpsSummit Production is truth

Slide 65

Slide 65 text

#GearsetDevOpsSummit Production is truth

Slide 66

Slide 66 text

#GearsetDevOpsSummit Production is truth

Slide 67

Slide 67 text

#GearsetDevOpsSummit Production is truth

Slide 68

Slide 68 text

#GearsetDevOpsSummit Production is truth

Slide 69

Slide 69 text

#GearsetDevOpsSummit Delta CI to the rescue

Slide 70

Slide 70 text

#GearsetDevOpsSummit Delta CI to the rescue

Slide 71

Slide 71 text

#GearsetDevOpsSummit Delta CI to the rescue

Slide 72

Slide 72 text

#GearsetDevOpsSummit Trunk based development

Slide 73

Slide 73 text

#GearsetDevOpsSummit Trunk based development

Slide 74

Slide 74 text

#GearsetDevOpsSummit Trunk based development

Slide 75

Slide 75 text

#GearsetDevOpsSummit Trunk based development

Slide 76

Slide 76 text

#GearsetDevOpsSummit Trunk based development

Slide 77

Slide 77 text

#GearsetDevOpsSummit Trunk based development

Slide 78

Slide 78 text

#GearsetDevOpsSummit Trunk based development Simple Features are small, so selective promotion is easy CI tool requirements are simple

Slide 79

Slide 79 text

#GearsetDevOpsSummit Trunk based development Simple Features are small, so selective promotion is easy CI tool requirements are simple Collaboration on unfinished code happens via prod No real data for UAT testing outside prod Sometimes user actually want fewer releases (e.g. when they require training to use) May require feature flags

Slide 80

Slide 80 text

#GearsetDevOpsSummit Feature branches

Slide 81

Slide 81 text

#GearsetDevOpsSummit Feature branches

Slide 82

Slide 82 text

#GearsetDevOpsSummit Feature branches

Slide 83

Slide 83 text

#GearsetDevOpsSummit Feature branches Allows collaboration in a sandbox/feature branch UAT in a full/partial sandbox is easy Allows larger releases Less frequent releases are mitigated by updating from Prod

Slide 84

Slide 84 text

#GearsetDevOpsSummit Feature branches Allows collaboration in a sandbox/feature branch UAT in a full/partial sandbox is easy Allows larger releases Less frequent releases are mitigated by updating from Prod Requires more advanced CI tooling/procedures No selective deployment from Integration org – it’s all or nothing Larger releases are more prone to failure

Slide 85

Slide 85 text

#GearsetDevOpsSummit Yet still we DevOp

Slide 86

Slide 86 text

#GearsetDevOpsSummit Yet still we DevOp ● It may be hard, but remember life before SFDX?

Slide 87

Slide 87 text

#GearsetDevOpsSummit Yet still we DevOp ● It may be hard, but remember life before SFDX? ● Understand your goals in each situation

Slide 88

Slide 88 text

#GearsetDevOpsSummit Yet still we DevOp ● It may be hard, but remember life before SFDX? ● Understand your goals in each situation ● Use least amount of process possible

Slide 89

Slide 89 text

#GearsetDevOpsSummit Yet still we DevOp ● It may be hard, but remember life before SFDX? ● Understand your goals in each situation ● Use least amount of process possible ● Don’t fixate on a single metric - it’s a system

Slide 90

Slide 90 text

#GearsetDevOpsSummit Yet still we DevOp ● It may be hard, but remember life before SFDX? ● Understand your goals in each situation ● Use least amount of process possible ● Don’t fixate on a single metric - it’s a system ● Quality and timely feedback improves software

Slide 91

Slide 91 text

#GearsetDevOpsSummit Yet still we DevOp ● It may be hard, but remember life before SFDX? ● Understand your goals in each situation ● Use least amount of process possible ● Don’t fixate on a single metric - it’s a system ● Quality and timely feedback improves software ● Tools can’t solve all your problems, but they are much better than no tools

Slide 92

Slide 92 text

#GearsetDevOpsSummit Thank you! [email protected] https://nebulaconsulting.co.uk/insights/ @AidanHarding