-
Notifications
You must be signed in to change notification settings - Fork 78
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
SFDX force:org:clone Errors if there is a sandbox that's been deleted and the name reused #1749
Comments
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. |
Getting the same error message with 7.172.0 when using the It definitely works fine in 7.146.1. The earliest version I tried in between was 7.162.0 and it fails with the same error message. |
This looks to be related to this known issue: |
The fact that it works just fine with sfdx-cli 7.146.1 makes me think it has little to do with the platform. I dug the differences in sfdx-core/org/org.ts in 7.146.1 and 7.173.0 and the former seems more resilient. IIUC, it uses the new sandbox instance ID when querying I couldn't figure out when exactly things went side ways, but I found an interesting bit in forcedotcom/sfdx-core#571: it added Can we add the same clauses to the query used in |
@mshanemc any thoughts on the comment above? |
version 7.171 was working, but stopped today. I get the same error for each version up to the current 7.178 |
Summary
When trying to clone a sandbox using a source sandbox, an error is returned when the source sandbox name has been reused, but the deleted sandbox is stuck in a 'Deleting' state, but is definitely not listed in the sandboxes list in Production.
ERROR running force:org:clone: The query returned more than 1 record
Steps To Reproduce:
feature-sandbox.json
{ "sourceSandboxName": "staging", "apexClassId" : "01p25000007eAbrAAE", "autoActivate" : true }
Expected result
Sandbox is cloned.
Actual result
Error is returned:
ERROR running force:org:clone: The query returned more than 1 record
System Information
{
"cliVersion": "sfdx-cli/7.171.0",
"architecture": "win32-x64",
"nodeVersion": "node-v16.17.0",
"pluginVersions": [
"@dx-cli-toolbox/sfdx-toolbox-package-utils 0.8.3 (user)",
"@oclif/plugin-autocomplete 1.3.0 (core)",
"@oclif/plugin-commands 2.2.0 (core)",
"@oclif/plugin-help 5.1.12 (core)",
"@oclif/plugin-not-found 2.3.1 (core)",
"@oclif/plugin-plugins 2.1.0 (core)",
"@oclif/plugin-update 3.0.0 (core)",
"@oclif/plugin-version 1.1.2 (core)",
"@oclif/plugin-warn-if-update-available 2.0.4 (core)",
"@oclif/plugin-which 2.1.0 (core)",
"alias 2.1.3 (core)",
"apex 1.2.0 (core)",
"auth 2.2.10 (core)",
"community 2.0.3 (core)",
"config 1.4.21 (core)",
"custom-metadata 2.0.1 (core)",
"data 2.1.4 (core)",
"generator 2.0.2 (core)",
"info 2.1.6 (core)",
"limits 2.0.3 (core)",
"org 2.2.7 (core)",
"packaging 1.9.4 (user)",
"schema 2.1.8 (core)",
"signups 1.2.4 (core)",
"source 2.0.16 (core)",
"telemetry 2.0.2 (core)",
"templates 55.1.0 (core)",
"trust 2.0.4 (core)",
"user 2.1.7 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
"salesforce-alm 54.8.1 (core)"
],
"osVersion": "Windows_NT 10.0.22621",
"shell": "cmd.exe",
"rootPath": "C:\Users\Paul Kissick\AppData\Local\sfdx\client\7.171.0-fbe9e7d"
}
Additional information
Looking at the log file after adding trace logging, there's a query to the tooling api:
SELECT Id, Status, SandboxName, SandboxInfoId, LicenseType, CreatedDate, CopyProgress, SandboxOrganization, SourceId, Description, EndDate FROM SandboxProcess WHERE SandboxName='staging' AND Status != 'D'
This shows there are 2 sandboxes, one in 'Deleting' status, one in 'Completed' status.
The text was updated successfully, but these errors were encountered: