force:mdapi:deploy sees a cancelled deployment as a success
See original GitHub issueSummary
When deploying to an org with the force:mdapi:deploy
command, if I cancel the deployment from inside the org then the CLI reports that as a successful deployment.
Steps To Reproduce:
- Deploy some source via
force:mdapi:deploy
and use the-w xx
flag to wait for results. - While the deploy is still running go into the org and cancel the deployment
- Check the exit code returned by SFDX it should return a status code “0” while also reporting “Status: Canceled”
Run the same steps for a deployment that fails for whatever reason (e.g. test code fails) and it returns a status code “1”
Expected result
Cancelled deployments should be considered a failed deployment and return a non-zero status code.
Actual result
Cancelled deployments are considered successful deployments and return a zero status code
Additional information
This is a particular issue in our CI system that when a deployment is cancelled it considers the run to be successful so we have incorrect tracking for what was deployed or not.
SFDX CLI Version: sfdx-cli/6.53.0-67a9cbb60c (windows-x64) node-v8.9.4
SFDX plugin Version: @salesforce/plugin-generator 1.0.1 (core) @salesforce/sfdx-trust 2.0.1 (core) builtins 1.0.0 (core) salesforcedx 45.2.0 (core)
OS and version: Windows 10 Pro, 1709
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:15 (3 by maintainers)
Top GitHub Comments
Fixed in
sfdx-cli 7.73.2
salesforcedx 49.9.2
Fix should be in next week’s patch release.