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

No errors for non-existing components in sf command #2405

Closed
itaishmida opened this issue Aug 14, 2023 · 6 comments
Closed

No errors for non-existing components in sf command #2405

itaishmida opened this issue Aug 14, 2023 · 6 comments
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated

Comments

@itaishmida
Copy link

Summary

I am trying to migrate from sfdx command to sf

When using the sfdx command to retrieve metadata - I get errors for problematic components, while when using the sf command, I do not get any prompt that I have problematic components in the component list.
This introduces problems especially when I have a big component list when most of the components are ok and one or a few are not - then I do not know if the command ran successfully.

Steps To Reproduce

While using sfdx to retrieve metadata - the result that I get is list of components that succeeded to retrieve and a list of components that failed, so, for example if I want to get 2 components, one exists and one does not exist I get these messages:

C:\Users\myuser\salesforce> sfdx force:source:retrieve -m CustomField:Case.Status,CustomField:Case.FieldDoesNotExist__c 
Retrieving v58.0 metadata from [email protected] using the v58.0 SOAP API
Preparing retrieve request... done
=== Retrieved Source

 FULL NAME   TYPE        PROJECT PATH                                                               STATE   
 ─────────── ─────────── ────────────────────────────────────────────────────────────────────────── ─────── 
 Case.Status CustomField force-app\main\default\objects\Case\fields\Status.field-meta.xml Changed
=== Retrieved Source Warnings

 FILE NAME              PROBLEM
 ────────────────────── ────────────────────────────────────────────────────────────────────────────── 
 unpackaged/package.xml Entity of type 'CustomField' named 'Case.FieldDoesNotExist__c' cannot be found

These results are very good because with them I can pinpoint errors very easily, especially for a large list of components

Now, when I migrate to the sf command format, I get a successful message for only one component - without any error or warning for the components that where not found:

C:\Users\myuser\salesforce> sf project retrieve start -m CustomField:Case.Status CustomField:Case.FieldDoesNotExist__c  
Retrieving v58.0 metadata from [email protected] using the v58.0 SOAP API
Preparing retrieve request... Succeeded

Retrieved Source
============================================================================================================
| State   Name        Type        Path
| ─────── ─────────── ─────────── ────────────────────────────────────────────────────────────────────────── 
| Changed Case.Status CustomField force-app\main\default\objects\Case\fields\Status.field-meta.xml

Expected result

I would expect to have also an error/warning for each component that does not exist, or that produces a problem

System Information

Using windows powershell from within VS Code

{
  "cliVersion": "@salesforce/cli/1.86.7-legacy.0",
  "architecture": "win32-x64",
  "nodeVersion": "node-v18.15.0",
  "osVersion": "Windows_NT 10.0.19045",
  "shell": "cmd.exe",
  "rootPath": "C:\\Users\\myuser\\AppData\\Local\\sfdx\\client\\7.209.6-8ba3197\\sf",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.1 (core)",
    "@oclif/plugin-commands 2.2.17 (core)",
    "@oclif/plugin-help 5.2.11 (core)",
    "@oclif/plugin-not-found 2.3.26 (core)",
    "@oclif/plugin-plugins 3.1.6 (core)",
    "@oclif/plugin-search 0.0.18 (core)",
    "@oclif/plugin-update 3.1.22 (core)",
    "@oclif/plugin-version 1.3.6 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.41 (core)",
    "@oclif/plugin-which 2.2.22 (core)",
    "@salesforce/cli 1.86.7-legacy.0 (core)",
    "apex 2.3.4 (core)",
    "auth 2.8.4 (core)",
    "data 2.4.5 (core)",
    "deploy-retrieve 1.13.5 (core)",
    "info 2.6.30 (core)",
    "limits 2.3.23 (core)",
    "login 1.2.15 (core)",
    "org 2.9.19 (core)",
    "packaging 1.20.1 (link) C:\\Users\\myuser\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\plugin-packaging",
    "schema 2.3.17 (core)",
    "settings 1.4.17 (core)",
    "sobject 0.1.32 (core)",
    "source 2.10.22 (core)",
    "telemetry 2.2.1 (core)",
    "templates 55.5.2 (core)",
    "trust 2.4.27 (core)",
    "user 2.3.20 (core)",
    "salesforce-app 1.0.0 (link) C:\\Users\\myuser\\repos\\salesforce"
  ]
}
@itaishmida itaishmida added the investigating We're actively investigating this issue label Aug 14, 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.

@github-actions
Copy link

Hello @itaishmida 👋

It looks like you're using an outdated version of Salesforce CLI. sf (v1) is in "maintenance mode" as of July 12, 2023. We highly recommend you move from sf (v1) to sf (v2) ASAP.

Moving to sf (v2) is easy and takes just two commands. Find all the information here.

After you move to the latest version of sf (v2), run your command again and provide the output of sf version --verbose --json.

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Aug 14, 2023
@itaishmida
Copy link
Author

I have reinstalled the CLI, my version is good now
and I still have the same bad results so this issue is still happening

this is my sf version command:

{
  "cliVersion": "@salesforce/cli/2.3.8",
  "architecture": "win32-x64",
  "nodeVersion": "node-v16.14.2",
  "osVersion": "Windows_NT 10.0.19045",
  "shell": "cmd.exe",
  "rootPath": "C:\\Users\\myuser\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.3 (core)",
    "@oclif/plugin-commands 2.2.21 (core)",
    "@oclif/plugin-help 5.2.15 (core)",
    "@oclif/plugin-not-found 2.3.34 (core)",
    "@oclif/plugin-plugins 3.1.8 (core)",
    "@oclif/plugin-search 0.0.21 (core)",
    "@oclif/plugin-update 3.1.28 (core)",
    "@oclif/plugin-version 1.3.8 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.46 (core)",
    "@oclif/plugin-which 2.2.29 (core)",
    "@salesforce/cli 2.3.8 (core)",
    "apex 2.3.9 (core)",
    "auth 2.8.10 (core)",
    "data 2.5.4 (core)",
    "deploy-retrieve 1.16.5 (core)",
    "info 2.6.35 (core)",
    "limits 2.3.27 (core)",
    "login 1.2.23 (core)",
    "org 2.9.28 (core)",
    "packaging 1.20.1 (link) C:\\Users\\myuser\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\plugin-packaging",
    "schema 2.3.21 (core)",
    "settings 1.4.21 (core)",
    "sobject 0.1.42 (core)",
    "source 2.10.28 (core)",
    "telemetry 2.2.3 (core)",
    "templates 55.5.7 (core)",
    "trust 2.5.1 (core)",
    "user 2.3.27 (core)",
    "salesforce-app 1.0.0 (link) C:\\Users\\myuser\\repos\\salesforce"
  ]
}

@github-actions github-actions bot added validated Version information for this issue has been validated investigating We're actively investigating this issue and removed more information required Issue requires more information or a response from the customer labels Aug 14, 2023
@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Sep 7, 2023
@git2gus
Copy link

git2gus bot commented Sep 7, 2023

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

@itaishmida
Copy link
Author

@mshanemc - is this fix deployed and released already?

@mshanemc
Copy link
Contributor

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 validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants