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: allow "project deploy validate --metadata-dir" to be executed outside of an SFDX project #2275

Closed
mingjiefeng opened this issue Jun 29, 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

@mingjiefeng
Copy link

mingjiefeng commented Jun 29, 2023

Summary

The new project deploy validate command (replacing force:mdapi:deploy) requires an SFDX project to deploy metadata in metadata format. The previous command did not have this requirement and the transition is causing difficulties with CI/CD since our directory structure does not conform to an SFDX project.

Steps To Reproduce

  1. Create a folder temp
  2. Create an empty package.xml in it:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <version>57.0</version>
</Package>
  1. Go up a directory and execute
    sf project deploy validate --metadata-dir temp --async --target-org username --test-level RunLocalTests --json

Expected result

No error and metadata API deployment validation should have started and a job id should be returned.

Actual result

RequiresProjectError: This command is required to run from within a Salesforce project directory.
Code: RequiresProjectError

System Information

  • Which shell or terminal are you using?
    cmd.exe

  • Paste the full output of the version --verbose --json command for the CLI you're using (sf or sfdx) below

{
  "cliVersion": "@salesforce/cli/1.84.8",
  "architecture": "win32-x64",
  "nodeVersion": "node-v18.16.0",
  "osVersion": "Windows_NT 10.0.19044",
  "shell": "cmd.exe",
  "rootPath": "C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.0 (core)",
    "@oclif/plugin-commands 2.2.16 (core)",
    "@oclif/plugin-help 5.2.10 (core)",
    "@oclif/plugin-not-found 2.3.26 (core)",
    "@oclif/plugin-plugins 3.1.3 (core)",
    "@oclif/plugin-search 0.0.17 (core)",
    "@oclif/plugin-update 3.1.19 (core)",
    "@oclif/plugin-version 1.3.5 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.39 (core)",
    "@oclif/plugin-which 2.2.22 (core)",
    "@salesforce/cli 1.84.8 (core)",
    "apex 2.3.3 (core)",
    "auth 2.8.2 (core)",
    "data 2.3.26 (core)",
    "deploy-retrieve 1.13.3 (core)",
    "info 2.6.22 (core)",
    "limits 2.3.22 (core)",
    "login 1.2.13 (core)",
    "org 2.9.14 (core)",
    "schema 2.3.14 (core)",
    "settings 1.4.14 (core)",
    "sobject 0.1.26 (core)",
    "source 2.10.19 (core)",
    "telemetry 2.2.1 (core)",
    "templates 55.4.22 (core)",
    "trust 2.4.22 (core)",
    "user 2.3.17 (core)"
  ]
}

Additional information

@mingjiefeng mingjiefeng added the investigating We're actively investigating this issue label Jun 29, 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 @mingjiefeng 👋 None of the versions of sf you shared match the latest release.

Shared: 1.84.0
Latest: 1.84.8

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)

After updating, share the full 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 investigating We're actively investigating this issue validated Version information for this issue has been validated and removed investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer labels Jun 29, 2023
@mingjiefeng
Copy link
Author

mingjiefeng commented Jun 29, 2023

Updated to latest version and still have the same issue. Here's the version info.

{
  "cliVersion": "@salesforce/cli/1.84.8",
  "architecture": "win32-x64",
  "nodeVersion": "node-v18.16.0",
  "osVersion": "Windows_NT 10.0.19044",
  "shell": "cmd.exe",
  "rootPath": "C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.0 (core)",
    "@oclif/plugin-commands 2.2.16 (core)",
    "@oclif/plugin-help 5.2.10 (core)",
    "@oclif/plugin-not-found 2.3.26 (core)",
    "@oclif/plugin-plugins 3.1.3 (core)",
    "@oclif/plugin-search 0.0.17 (core)",
    "@oclif/plugin-update 3.1.19 (core)",
    "@oclif/plugin-version 1.3.5 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.39 (core)",
    "@oclif/plugin-which 2.2.22 (core)",
    "@salesforce/cli 1.84.8 (core)",
    "apex 2.3.3 (core)",
    "auth 2.8.2 (core)",
    "data 2.3.26 (core)",
    "deploy-retrieve 1.13.3 (core)",
    "info 2.6.22 (core)",
    "limits 2.3.22 (core)",
    "login 1.2.13 (core)",
    "org 2.9.14 (core)",
    "schema 2.3.14 (core)",
    "settings 1.4.14 (core)",
    "sobject 0.1.26 (core)",
    "source 2.10.19 (core)",
    "telemetry 2.2.1 (core)",
    "templates 55.4.22 (core)",
    "trust 2.4.22 (core)",
    "user 2.3.17 (core)"
  ]
}

@shetzel shetzel added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Jul 6, 2023
@git2gus
Copy link

git2gus bot commented Jul 6, 2023

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

@mingjiefeng
Copy link
Author

Thanks @WillieRuemmele! When are we expecting the fix to be released?

@WillieRuemmele
Copy link
Member

WillieRuemmele commented Jul 26, 2023

Hi @mingjiefeng - going off of when the PR was merged "2 weeks ago", it should be released in latest this Wednesday today!

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

4 participants