0

I think that the SSoT (single source of truth) is VCS (e.g. Git) Am I right?

2 Answers 2

3

All the metadata files that represent your org (as best it can) is the "truth". You'd really want to use "all" in this case to call it the representation of your org. When you put that in one accessible location, it becomes the single source of truth.

Git is just a version control system (VCS). It's used to track changes in any set of files.

To reiterate, having one location with those set of files that represent your system is really the single source of truth.

You could then have those set of files be hosted remotely using many services catered for git (Github, Gitlab, Bitbucket, etc).

So, in essence, wherever you decide to store your set of files (in this case, metadata from the Metadata API in Salesforce) is the single source of truth while git assists your workflow in all developers accessing those files, making changes, and tracking changes.

1

Both org based and source based development are important. Source based works better for code merge and application development where limited metadata types are needed. This model works well for developers using Salesforce DX and Visual Studio Code. But system administrators dealing with the other 200 metadata types need org based sandboxes and release management systems. For example, there is not much point putting Profiles in Git. They are huge and not human readable. I've written about some of the best practices, here is a link:

https://appexchange.salesforce.com/appxContentListingDetail?listingId=a0N3A00000FR5Vw

3
  • 3
    I personally think there is point in putting everything in git - you can (at least conceptually - Salesforce behaviour can actually prevent this) reproduce any version of your configuration at any time and you can look at who made what changes, when. As long as the metadata files are text rather than blob based your VCS can help you understand changes made over time using relevant diffs. If I could, I would make it impossible to make untracked changes. It is often the uncontrolled changes applied by admins that mess stuff up - and is a frequent source of trouble for devs...
    – Phil W
    Commented Jan 21, 2020 at 13:14
  • For example, because the admin adds some validation rules the unit tests for code no longer pass.
    – Phil W
    Commented Jan 21, 2020 at 13:14
  • I think that this may not answer the question being asked.
    – Derek F
    Commented Jan 21, 2020 at 13:43

Not the answer you're looking for? Browse other questions tagged .