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 start with --wait time of zero (0) does not work #2392

Closed
mlaso opened this issue Aug 3, 2023 · 3 comments
Closed

sf project deploy start with --wait time of zero (0) does not work #2392

mlaso opened this issue Aug 3, 2023 · 3 comments
Labels
more information required Issue requires more information or a response from the customer

Comments

@mlaso
Copy link

mlaso commented Aug 3, 2023

Summary

We faced a breaking change on our pipelines and external applications after update from SFDX to SF CLI v2. In big metadata deployments, we are using a wait time of 0 to return "immediately" a JSON with the deployment ID. Then we call "report" from a service to know how the deployment is doing.

From the "old" documentation: To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue to use the CLI.

Steps To Reproduce

Go to any SF project, and try to deploy any metadata with a wait time of 0:

sf project deploy start -m ApexClass:MyClass -o MyOrg -w 0 --json

Expected result

The command should return 0 and we should get back on the stdout the JSON containing the deployment job ID

Actual result

We get a exit code on 1 with the following error

{
  "code": 1,
  "context": "DeployMetadata",
  "commandName": "DeployMetadata",
  "message": "Parsing --wait \n\tThe value must be at least 1.\nSee more help with --help",
  "name": "DurationBoundsMinError",
  "status": 1
}

System Information

Tested on Manjaro Linux , using bash. I'm using Volta as a JS tool manager. Salesforce CLi version is the following

{
  "cliVersion": "@salesforce/cli/2.1.7",
  "architecture": "linux-x64",
  "nodeVersion": "node-v18.16.0",
  "osVersion": "Linux 6.1.41-1-MANJARO",
  "shell": "bash",
  "rootPath": "/home/mlaso/.volta/tools/image/packages/@salesforce/cli/lib/node_modules/@salesforce/cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.2 (core)",
    "@oclif/plugin-commands 2.2.18 (core)",
    "@oclif/plugin-help 5.2.13 (core)",
    "@oclif/plugin-not-found 2.3.31 (core)",
    "@oclif/plugin-plugins 3.1.6 (core)",
    "@oclif/plugin-search 0.0.20 (core)",
    "@oclif/plugin-update 3.1.26 (core)",
    "@oclif/plugin-version 1.3.7 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.43 (core)",
    "@oclif/plugin-which 2.2.25 (core)",
    "@salesforce/cli 2.1.7 (core)",
    "apex 2.3.6 (core)",
    "auth 2.8.9 (core)",
    "data 2.5.1 (core)",
    "deploy-retrieve 1.16.0 (core)",
    "functions 1.21.9 (user)",
    "info 2.6.31 (core)",
    "limits 2.3.26 (core)",
    "login 1.2.20 (core)",
    "org 2.9.25 (core)",
    "packaging 1.17.1 (user)",
    "schema 2.3.20 (core)",
    "settings 1.4.20 (core)",
    "sobject 0.1.37 (core)",
    "source 2.10.25 (core)",
    "telemetry 2.2.3 (core)",
    "templates 55.5.5 (core)",
    "trust 2.4.32 (core)",
    "user 2.3.24 (core)"
  ]
}

Additional information

I can not find any doc regarding this topic. I dont know if it is a expected breaking change or what. But should be nice to have a way to return the flow control immediately to the window.

@mlaso mlaso added the investigating We're actively investigating this issue label Aug 3, 2023
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

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

github-actions bot commented Aug 3, 2023

Hello @mlaso 👋 None of the versions of sf you shared match the latest release.

Shared: 2.1.7
Latest: 2.2.7

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 and removed investigating We're actively investigating this issue labels Aug 3, 2023
@mlaso
Copy link
Author

mlaso commented Aug 3, 2023

My bad. Just after filling the issue, I found the solution. Using the --async flag.

We can close the issue

@mlaso mlaso closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Issue requires more information or a response from the customer
Projects
None yet
Development

No branches or pull requests

1 participant