cli icon indicating copy to clipboard operation
cli copied to clipboard

sfdx force:org:status --json should return progress

Open mnunezdm opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

When running sfdx force:org:status -n sbName --json -w 10 when polling for a sandbox creation, if the refresh is not completed after the timeout, process returns with error, with no information.

$ sfdx force:org:status -n bDaily --json
{
  "status": 1,
  "name": "pollingTimeout",
  "message": "Sandbox status is Pending; timed out waiting for completion.",
  "exitCode": 1,
  "commandName": "OrgStatusCommand",
  "stack": "pollingTimeout: Sandbox status is Pending; timed out waiting for completion.\n    at Function.create (/home/XXXXXX/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/sfdxError.js:160:16)\n    at SandboxOrg.pollStatusAndAuth (/home/XXXXXX/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/org/sandbox/sandboxOrg.js:189:44)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)",
  "warnings": []
}

When running without the json parameter we can see the percentage

$ sfdx force:org:status -n bDaily
Sandbox request bDaily(0GR09000000H1ovGAC) is Pending (0% completed). Sleeping 30 seconds. Will wait 6 minutes more before timing out.

What are you trying to do

It would be nice to get the information of the SandboxProcess record

Describe the solution you'd like

Receive something like

{
  "status": 0,
  "result":   {
    "Id": "xxxxx",
    "IsDeleted": false,
    "CreatedDate": "2022-03-10T10:25:57.000+0000",
    "CreatedById": "xxxx",
    "LastModifiedDate": "2022-03-10T10:25:57.000+0000",
    "LastModifiedById": "xxxxx",
    "SystemModstamp": "2022-03-10T10:25:57.000+0000",
    "SandboxInfoId": "xxxx",
    "SandboxName": "bDaily",
    "LicenseType": "DEVELOPER",
    "TemplateId": null,
    "HistoryDays": 0,
    "CopyChatter": false,
    "AutoActivate": false,
    "StartDate": "2022-03-10T10:25:57.000+0000",
    "EndDate": null,
    "ActivatedDate": null,
    "ActivatedById": null,
    "RefreshAction": null,
    "ApexClassId": null,
    "Description": "Daily production backup",
    "CopyProgress": 0,
    "Status": "Pending",
    "SandboxOrganization": null,
    "SourceId": null
  }
}

Describe alternatives you've considered

Query directly the object, but, this, in my opinion should be done inside the status command

Additional context Add any other context or screenshots about the feature request here.

mnunezdm avatar Mar 10 '22 10:03 mnunezdm

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

github-actions[bot] avatar Mar 10 '22 10:03 github-actions[bot]

This issue has not received a response in 60 days. It will auto-close in 7 days unless a response is posted.

github-actions[bot] avatar Sep 21 '22 19:09 github-actions[bot]

use the new org resume sandbox command. It'll return more detailed information.

mshanemc avatar Feb 13 '23 16:02 mshanemc