A developer is preparing a large metadata deployment package using Salesforce CLI. Which TWO strategies should the developer implement to optimize deployment speed and minimize component locking issues? Choose 2 answers.
Trap 1: Include all profile and permission set metadata in every…
Deploying massive profile and permission set files frequently causes severe deployment bottlenecks and object locking errors. Profiles contain excessive metadata references that slow down validation times unnecessarily when only specific Apex classes or custom objects are being modified.
Trap 2: Run all local unit tests during every single minor metadata…
Forcing the execution of all local unit tests during minor metadata deployments wastes valuable pipeline execution time. Developers should target specific test classes or rely on quick deployments when tests have already passed during the validation stage.
Trap 3: Disable all active workflow rules and validation rules in the…
Manually modifying production automation rules prior to deployments introduces unnecessary administrative overhead and human error risks. Modern declarative and programmatic deployments should handle dependencies cleanly via manifest files without manual intervention.
- A
Include all profile and permission set metadata in every incremental hotfix deployment to ensure security consistency across environments.
Why it fails: Deploying massive profile and permission set files frequently causes severe deployment bottlenecks and object locking errors. Profiles contain excessive metadata references that slow down validation times unnecessarily when only specific Apex classes or custom objects are being modified.
- B
Utilize the sf project deploy validate command followed by sf project deploy quick to execute deployments without re-running tests.
Validating deployments beforehand stores test results and compilation checks. Executing a quick deploy references the validation ID, skipping the time-consuming test execution phase entirely and drastically accelerating the release pipeline velocity into production orgs.
- C
Run all local unit tests during every single minor metadata deployment regardless of whether Apex classes were modified.
Why it fails: Forcing the execution of all local unit tests during minor metadata deployments wastes valuable pipeline execution time. Developers should target specific test classes or rely on quick deployments when tests have already passed during the validation stage.
- D
Deploy Apex classes and triggers separately from standard objects and fields to minimize database table locking contention.
Bundling schema changes and code compilation together often triggers exclusive table locks on standard and custom objects. Splitting metadata packages reduces concurrent write operations, significantly lowering the risk of deployment failures caused by timeout lock exceptions.
- E
Disable all active workflow rules and validation rules in the target production environment manually before initiating deployments.
Why it fails: Manually modifying production automation rules prior to deployments introduces unnecessary administrative overhead and human error risks. Modern declarative and programmatic deployments should handle dependencies cleanly via manifest files without manual intervention.