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

force:source:push doesn't fail on component failures #2008

Closed
noerremark opened this issue Mar 21, 2023 · 5 comments
Closed

force:source:push doesn't fail on component failures #2008

noerremark opened this issue Mar 21, 2023 · 5 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue

Comments

@noerremark
Copy link

Steps To Reproduce:

  1. Change a component to something obviously invalid
  2. Run ($? is the Return Code)
force:source:push
echo $?
  1. Observe that the code returned is 0, which indicates that no failure happened

Expected result

Since the push actually failed, it should have returned something else than 0.

Actual result

Pushing v53.0 metadata to [email protected] using the v57.0 SOAP API
DEPLOY PROGRESS | ████████████████████████████████████████ | 1/1 Components
Updating source tracking... done

=== Pushed Source

 STATE   FULL NAME  TYPE      PROJECT PATH                                           
 ─────── ────────── ───────── ────────────────────────────────────────────────────── 
 Changed c_UnitTest ApexClass force-app/main/default/classes/c_UnitTest.cls          
 Changed c_UnitTest ApexClass force-app/main/default/classes/c_UnitTest.cls-meta.xml 

=== Component Failures [1]

 Type  Name                            Problem                 
 ───── ─────────────────────────────── ─────────────────────── 
 Error classes/c_UnitTest.cls-meta.xml Invalid api version:0.0 

0

System Information

sfdx-cli/7.192.2 darwin-x64 node-v18.14.1

@noerremark noerremark added the investigating We're actively investigating this issue label Mar 21, 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.

@iowillhoit
Copy link
Contributor

Interesting, I am not seeing that.
Screenshot 2023-03-21 at 1 28 57 PM

  • When you run this with --json does it give you an exitCode and status of 1?
  • Could you send the full output of sfdx version --verbose

@iowillhoit
Copy link
Contributor

Ok i was able to reproduce this. In my example above there were only failures, which gave an exitcode of 1 as expected. When you have a push that has successes and failures, it looks like you should get an exit code 68 to show partial success.

Source: https://github.com/salesforcecli/plugin-source/blob/main/src/commands/force/source/push.ts#L200-L215

Screenshot 2023-03-21 at 2 01 43 PM

I will get a ticket created and confirm with the team. Thanks @noerremark!

@iowillhoit iowillhoit added the bug Issue or pull request that identifies or fixes a bug label Mar 21, 2023
@git2gus
Copy link

git2gus bot commented Mar 21, 2023

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

@iowillhoit
Copy link
Contributor

This is working as expected in the new project deploy start command, please use that command instead. Note that we did just merge in a fix to properly print component failures to stdout. That will be in latest-rc next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

2 participants