Sub topic 18
Release practices for teams
This chapter assumes you have read the earlier chapters on work items, pull requests, promotion, conflicts, test gates and permissions. It does not introduce new DevOps Center features. It shows how a team combines them into habits that keep releases small, reviewable and reversible.
Why team practices matter
DevOps Center enforces a path: a work item, a branch, a pull request, then a promotion through each stage. It does not enforce the quality of what travels along that path. A team can push a 400-component work item through every stage and still have a bad release. The practices below cover the decisions the tool leaves to you.
Keep work items small and single-purpose
A work item is the unit of review, promotion and rollback. Size it for the way you want to recover from a failure.
- One work item should deliver one outcome, such as "Add a Region field to Account and expose it on the page layout."
- If a change can be released or reverted independently, give it its own work item.
- Split large features into a sequence of work items that each leave the org in a working state.
- Avoid using a work item as a bucket for "all changes this sprint". Reverting one part then means reverting everything.
Small work items also reduce conflicts. Two people editing the same Flow or profile in separate work items collide only if both stay open for a long time.
Agree on naming and a definition of done
Write these rules down and keep them in the repository, for example in a CONTRIBUTING.md file.
| Item | Practice |
|---|---|
| Work item name | Start with the ticket ID, then a short verb phrase: `PROJ-142 Add Region to Account` |
| Commit message | Describe what changed and why, not "updates" |
| Pull request description | State the business reason, the components touched and how you tested |
| Definition of done | Committed, reviewed, tests pass in the first stage, release notes line written |
A consistent name lets you search the Git history by ticket and match a production change to its request.
Keep the repository clean
The repository is the source of truth, so keep tooling noise out of it. A .forceignore file stops local files from reaching the pipeline.
# .forceignore
**/jsconfig.json
**/.eslintrc.json
**/__tests__/**
.sfdx
.sfKeep sfdx-project.json minimal and review changes to it like code. A wrong sourceApiVersion or path affects every work item.
{
"packageDirectories": [
{ "path": "force-app", "default": true }
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "62.0"
}Make review a real gate
Pull requests are the point where a second person checks the work. Back this up with rules on the Git provider, not just team agreement.
- Protect the branches that map to pipeline stages so nobody pushes to them directly.
- Require at least one approving review from someone other than the author.
- Require reviewers to open the changed metadata, not only skim the file list. Profiles, permission sets and Flows deserve extra attention.
- Name code owners for sensitive areas such as security metadata, so those changes always reach the right reviewer.
A review that checks only whether the build is green is a rubber stamp. Ask what the change does to existing users, data and integrations.
Promote on a predictable rhythm
Choose a promotion cadence and keep to it. Two patterns work well.
- Continuous flow. Each approved work item moves through stages as soon as it passes. This suits teams with strong automated tests.
- Release trains. Work items collect in an early stage, then promote together on a set day. This suits teams with manual UAT or business sign-off.
Whichever you choose, protect the last step. Promote to production in an agreed window, with a named release owner and a named person who can approve a rollback. Avoid Friday-afternoon promotions unless you can staff the weekend.
Before each promotion, list what it would carry. This command shows the commits that reached UAT but not yet the main branch.
git fetch origin
git log --oneline origin/main..origin/UATIf the list contains a commit nobody expected, stop and find out why before you promote.
Test before you promote
A passing build in a low stage does not prove production will accept the change. Production runs tests on deployment, and an org with different data or metadata can behave differently. Validate against the stage you are about to promote into.
sf org login web --alias uat
sf project deploy start --source-dir force-app --target-org uat --dry-run --test-level RunLocalTestsUse the dry run for large or risky changes. It reports test failures and coverage problems without changing the org, so you find them before the release window and not during it.
Keep environments aligned
Many failed releases come from environments that have drifted apart.
- Refresh development sandboxes on a schedule so they start from something close to production.
- Do not make changes directly in UAT or production. A direct change creates drift that later shows up as a conflict or a surprise overwrite.
- Take hotfixes through the same pipeline, and make sure the fix also reaches the earlier stages. Otherwise the next release can reintroduce the bug.
- Record configuration that lives outside metadata, such as data records or manual post-deployment steps, in the work item or release notes.
The release flow at a glance
Govern with roles and a small audit trail
Practices hold only if the right people have the right access. Tie them to the roles you set up earlier.
- Give developers access to work items and development environments, but limit who can promote to production.
- Keep the person who approves a change separate from the person who wrote it.
- Keep release notes and the pull request history as your audit trail. Each production change should link back to a request, a review and a promotion.
- Review who holds release permissions every quarter, and remove access for people who changed roles.
Measure and improve
Track a few numbers after each release and discuss them in a short retrospective.
- Lead time: how long a work item takes from creation to production.
- Failure rate: the share of releases that need a rollback or hotfix.
- Conflict rate: how often work items collide, which hints that they are too large or too long-lived.
- Time to restore: how long it takes to fix a failed release.
Change one habit at a time and watch whether these numbers improve.
Common mistakes
- Combining unrelated changes in one work item, which makes rollback all-or-nothing.
- Leaving work items open for weeks, which makes conflicts likely.
- Approving pull requests without opening the metadata.
- Fixing a problem directly in production and forgetting to commit it.
- Promoting to production without a dry run for a large release.
- Letting everyone hold promotion rights.
Exercise
Your team's last two releases each needed a rollback. Reviews were quick and all pipeline checks passed. Name three practices from this chapter you would change first, and say what each one fixes.
Show answer
First, split work items so each delivers one independently releasable outcome. Rollback then affects one change and not the whole release. Second, make reviewers open the changed metadata and require a reviewer other than the author. Fast approvals suggest a rubber stamp, and this catches harmful changes before promotion. Third, run a dry-run validation with local tests against the stage you are about to promote into, and list the commits with git log before each promotion. This catches test failures and unexpected commits before the release window. Tracking failure rate afterward shows whether the changes helped.