question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

force:mdapi:deploy sees a cancelled deployment as a success

See original GitHub issue

Summary

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:

  1. Deploy some source via force:mdapi:deploy and use the -w xx flag to wait for results.
  2. While the deploy is still running go into the org and cancel the deployment
  3. 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:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
amphrocommented, Sep 4, 2020

Fixed in sfdx-cli 7.73.2 salesforcedx 49.9.2

6reactions
shetzelcommented, Aug 27, 2020

Fix should be in next week’s patch release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cancel an in progress deployment or validation
Cancel an in progress deployment or validation · 1. From the UI: Go to Setup, then under Environments->Deploy select Deployment Status. · 2....
Read more >
cancel-deployment — AWS CLI 1.27.23 Command Reference
This operation cancels the deployment for devices that haven't yet received it. If a device already received the deployment, this operation doesn't change ......
Read more >
release deployed, but marked as cancelled
I start a deployment in A and cancel it. The end result is that the Deploy a Release step is marked as cancelled,...
Read more >
Deployment is Completed Successfully but Deployment ...
You will see the deployment completed on the Deployment Status page but the ... you should be able to update the Deployment Job...
Read more >
Rolling App Deployments | Cloud Foundry Docs
To cancel, see Cancel a Deployment below. cf CLI v6: Run: cf v3-zdt-push APP-NAME. Where ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found