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

sf project deploy validate is not explaining why validation failed #2757

Closed
JavierCarvajalLBS opened this issue Mar 7, 2024 · 6 comments
Closed
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated

Comments

@JavierCarvajalLBS
Copy link

JavierCarvajalLBS commented Mar 7, 2024

Summary

When running a "sf project deploy validate" command, the validation fails, but the only message received is:

FailedValidationError: Failed to validate the deployment (XXXXXXXXXXXXX). Due To:\n1 component error(s)

Steps To Reproduce

The following command was executed:

project deploy validate --manifest \"${PACKAGE_XML_PATH}\" --test-level RunLocalTests --wait 120 --verbose --target-org Prod --json > output.txt

The package.xml contains:

  • 6 custom fields
  • 2 lightning record pages
  • 3 flows
  • 1 quick action

Expected result

The deployment should be validated or, if canceled, an explanation of the cancelation reason should be received.

Actual result

The validation is canceled after a couple of minutes with the following message:

FailedValidationError: Failed to validate the deployment (XXXXXXXXXXXXX). Due To:\n1 component error(s)

System Information

The command is executed through a Jenkins job, that can deploy without issues. Now, we are including the validation option.

The sf CLI was updated today with the latest version available

sf version --verbose --json
{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.30.8",
  "nodeVersion": "node-v20.11.1",
  "osVersion": "Windows_NT 10.0.17763",
  "rootPath": "D:\\Program Files\\sf\\client",
  "shell": "cmd.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.9 (core)",
    "@oclif/plugin-commands 3.1.4 (core)",
    "@oclif/plugin-help 6.0.13 (core)",
    "@oclif/plugin-not-found 3.0.11 (core)",
    "@oclif/plugin-plugins 4.2.5 (core)",
    "@oclif/plugin-search 1.0.16 (core)",
    "@oclif/plugin-update 4.1.13 (core)",
    "@oclif/plugin-version 2.0.12 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.12 (core)",
    "@oclif/plugin-which 3.1.0 (core)",
    "@salesforce/cli 2.30.8 (core)",
    "apex 3.0.25 (core)",
    "auth 3.3.13 (core)",
    "data 3.1.1 (core)",
    "deploy-retrieve 3.2.16 (core)",
    "info 3.0.27 (core)",
    "limits 3.1.10 (core)",
    "marketplace 1.0.25 (core)",
    "org 3.3.14 (core)",
    "packaging 2.1.10 (core)",
    "schema 3.1.3 (core)",
    "settings 2.0.27 (core)",
    "sobject 1.1.13 (core)",
    "source 3.1.15 (core)",
    "telemetry 3.1.13 (core)",
    "templates 56.0.16 (core)",
    "trust 3.3.10 (core)",
    "user 3.2.11 (core)"
  ]
}
@JavierCarvajalLBS JavierCarvajalLBS added the investigating We're actively investigating this issue label Mar 7, 2024
Copy link

github-actions bot commented Mar 7, 2024

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 github-actions bot added the validated Version information for this issue has been validated label Mar 7, 2024
@JavierCarvajalLBS
Copy link
Author

I forgot to mention that the issue happens in a Production org.
With the same command and package in a sandbox, validation cancels after more than 20 minutes due to insufficient code coverage in a trigger due to the execution of all local tests in the sandbox.

@shetzel shetzel added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Mar 7, 2024
Copy link

git2gus bot commented Mar 7, 2024

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

@shetzel
Copy link
Contributor

shetzel commented Mar 7, 2024

Looks like you can get the detailed failure messages if you don't use the --json flag. This happens when there are errors in the deployed metadata components. We'll fix the bug. Thanks for reporting.

@JavierCarvajalLBS
Copy link
Author

@shetzel you were right
When I removed the --json parameter and executed the validation again, I could read the entire response in the log file.
Then, we´ll wait until it is fixed, as we need to capture the response in a json file to analyze and extract everything.

@jshackell-sfdc
Copy link
Collaborator

This issue is fixed in Salesforce CLI release 2.33.3.

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

3 participants