Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in force:source:push failure JSON output; status is zero when exitCode is non-zero #2079

Closed
SCWells72 opened this issue Apr 18, 2023 · 7 comments
Labels
breaking change Pull request breaks existing functionality and can be merged only into a major version bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue regression Issue that regresses existing functionality

Comments

@SCWells72
Copy link

I've had a few IC2 users reporting situations where force:source:push has actually failed but is being reported as successful by IC2. After digging in a bit, this seems to be because the JSON output now specifies a status value of 0 when exitCode is non-zero, e.g.:

{
    "status": 0,
    "name": "DeployFailed",
    "exitCode": 1,
    "commandName": "Push",
     ...

In the past, status has been reliably non-zero on failure. Is this an expected/intentional change? I can (and likely will) update IC2 to use all of the available information to determine success vs. failure, but status has been a reliable indicator pretty much all along until very recently, so my guess is that this is an unintentional/accidental regression.

@SCWells72 SCWells72 added the investigating We're actively investigating this issue label Apr 18, 2023
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@SCWells72
Copy link
Author

Upon further inspection, it looks like this may actually be happening because status was removed from the response altogether and the value of 0 is the result of deserialization from JSON into a status property with a default value of 0. Still a breaking change to the previous CLI-as-an-API contract, but perhaps a bit different from described above where it was assumed to be set explicitly to that value.

@SCWells72
Copy link
Author

Confirmed that status has been removed from the failure response for force:source:push:

$ sfdx force:source:push --json
{
  "name": "DeployFailed",
  "actions": [],
  "exitCode": 1,
  "data": [
    ...
  ],
  "commandName": "Push",
  "warnings": [
    "We plan to deprecate this command in the future. Try using the \"project deploy start\" command instead.",
    "The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead."
  ]
}

@WillieRuemmele WillieRuemmele added bug Issue or pull request that identifies or fixes a bug regression Issue that regresses existing functionality breaking change Pull request breaks existing functionality and can be merged only into a major version labels Apr 18, 2023
@git2gus
Copy link

git2gus bot commented Apr 18, 2023

This issue has been linked to a new work item: W-13056333

@git2gus
Copy link

git2gus bot commented Apr 18, 2023

This issue has been linked to a new work item: W-13056334

@WillieRuemmele
Copy link
Member

WillieRuemmele commented Apr 18, 2023

Hey @SCWells72 This is fixed in the nightly build of the CLI, I'm patching latest-rc now which will be promoted tomorrow, as you probably know. I'm also patching latest for today

Thanks again for reporting 😄

@WillieRuemmele
Copy link
Member

This should be fixed in all channels of the CLI with plugin-source@2.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Pull request breaks existing functionality and can be merged only into a major version bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue regression Issue that regresses existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants