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

fix: print errors from server #623

Merged
merged 1 commit into from
May 26, 2023
Merged

fix: print errors from server #623

merged 1 commit into from
May 26, 2023

Conversation

WillieRuemmele
Copy link
Contributor

What does this PR do?

prints errors reported by the server that were missed from .getFileResponses
before

 ➜  ../../oss/plugin-deploy-retrieve/bin/dev project:deploy:start                                                     
*** Deploying with SOAP API v57.0 ***
Deploy ID: 0AfDR00002Z1Q1i0AF
Status: Failed | ████████████████████████████████████████ | 3/3 Components

after

 ➜  ../../oss/plugin-deploy-retrieve/bin/dev project:deploy:start
*** Deploying with SOAP API v57.0 ***
Deploy ID: 0AfDR00002Z1Rxo0AF
Status: Failed | ████████████████████████████████████████ | 3/3 Components

Component Failures [1]
===================================================================
| Type  Name                               Problem                  
| ───── ────────────────────────────────── ──────────────────────── 
| Error classes/FileUtilities.cls-meta.xml Invalid api version:88.0 

What issues does this PR fix or reference?

@W-12727451@
forcedotcom/cli#2008

@iowillhoit iowillhoit self-requested a review May 26, 2023 17:13
@iowillhoit
Copy link
Contributor

QA NOTES

  • 🟢 Component failures are now listed
  • 🟢 Exit code is 1 after failed components
  • 🟢 The json status is also 0
> sfdx project deploy start --json
{
  "status": 1,
  "result": {
    "checkOnly": false,
    "completedDate": "2023-05-26T18:01:43.000Z",
    "createdBy": "0056s000004qGRL",
    "createdByName": "User User",
    "createdDate": "2023-05-26T18:01:41.000Z",
    "details": {
      "componentFailures": [
        {
          "changed": false,
          "componentType": "CustomField",
          "created": false,
          "createdDate": "2023-05-26T18:01:41.000Z",
          "deleted": false,
          "fileName": "objects/Broker__c.object",
          "fullName": "Broker__c.Brokear_Id__c",
          "problem": "Not in package.xml",
          "problemType": "Error",
          "success": false
        }
      ],
      "componentSuccesses": [
        {
          "changed": true,
          "componentType": "CustomField",
          "created": false,
          "createdDate": "2023-05-26T18:01:42.000Z",
          "deleted": false,
          "fileName": "objects/Broker__c.object",
          "fullName": "Broker__c.Phone__c",
          "id": "00N6s00000DV7CEEA1",
          "success": true
        },
        {
          "changed": true,
          "componentType": "ApexClass",
          "created": false,
          "createdDate": "2023-05-26T18:01:43.000Z",
          "deleted": false,
          "fileName": "classes/FileUtilities.cls",
          "fullName": "FileUtilities",
          "id": "01p6s00000Amwr2AAB",
          "success": true
        },
        {
          "changed": true,
          "componentType": "",
          "created": false,
          "createdDate": "2023-05-26T18:01:43.000Z",
          "deleted": false,
          "fileName": "package.xml",
          "fullName": "package.xml",
          "success": true
        }
      ],
      "runTestResult": {
        "numFailures": 0,
        "numTestsRun": 0,
        "totalTime": 0,
        "codeCoverage": [],
        "codeCoverageWarnings": [],
        "failures": [],
        "flowCoverage": [],
        "flowCoverageWarnings": [],
        "successes": []
      }
    },
    [...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants