You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run sf org create sandbox --definition-file config/developer-sandbox-def.json --alias dev1clone --target-org productionAlias --no-prompt
I generated a new project using sf project generate and committed here - link. There's actually only the developer-sandbox-def.json file committed and relevant.
Expected result
A new sandbox (name: dev1clone) is being created and it's a copy of dev1 existing sandbox.
Actual result
A new sandbox (name: dev1clone) is being created and it's a copy of production.
Additional information
I fiddled around with different combinations of developer-sandbox-def.json settings and sf org create sandbox flags. The sourceSandboxName json setting seemed to be always ignored, no matter what.
On the other hand, when I run sf org create sandbox --definition-file config/developer-sandbox-def.json --alias dev1clone --target-org productionAlias --no-prompt --clone dev1 (I added the -clone dev1 flag), it resulted in creating a cloned sandbox correctly. No matter if the sourceSandboxName was present in developer-sandbox-def.json or not.
To sum up, I got to the conclusion that --clone flag has always worked well but sourceSandboxName setting in developer-sandbox-def.json file has had totally no effect.
Here are two more SF CLI output examples. In both cases developer-sandbox-def.json looks like described in the Steps To Reproduce section above (it includes "sourceSandboxName": "dev1").
The only difference between them is that there's a SourceId 0GQ1i000000TQESGA4 line when I used the --clone dev1 flag.
$ sf org create sandbox --definition-file config/developer-sandbox-def.json --alias dev1clone --target-org productionAlias --no-prompt
Sandbox Create... 00:30:00 until timeout. 0%
Field Value
───────────── ────────────────────────────
Id 0GRW60000000F3tOAE
SandboxName dev1clone
Status Pending
LicenseType DEVELOPER
SandboxInfoId 0GQW600000006i9OAA
Created Date 2024-09-27T11:30:18.000+0000
CopyProgress 0%
---------------------
Sandbox Create Stages
… - Pending
… - Processing
… - Activating
… - Authenticating
$ sf org create sandbox --definition-file config/developer-sandbox-def.json --alias dev1clone --target-org productionAlias --no-prompt --clone dev1
Sandbox Create... 00:30:00 until timeout. 0%
Field Value
───────────── ────────────────────────────
Id 0GRW60000000F5VOAU
SandboxName dev1clone
Status Pending Remote Creation
LicenseType DEVELOPER
SandboxInfoId 0GQW600000006lNOAQ
Created Date 2024-09-27T11:33:40.000+0000
CopyProgress 0%
SourceId 0GQ1i000000TQESGA4
---------------------
Sandbox Create Stages
… - Pending
… - Processing
… - Activating
… - Authenticating
System Information
I've noticed the issue using Windows 10 & Powershell 7, as well as in cloud GitLab pipelines using Bash.
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.
Hi @stafik - thanks for reporting this. We're looking into it, and agree that it's a little weird. We're looking at how to make it work more like org create scratch where the flags can override what's in the file, or updating how the --clone flag works, but this could also be a breaking change.
Summary
Cloning developer sandboxes using SF CLI and the
--definition-file
flag still creates a sandbox from production org.Steps To Reproduce
Prerequisite: having a developer sandbox (sandbox name:
dev1
)sf org create sandbox --definition-file config/developer-sandbox-def.json --alias dev1clone --target-org productionAlias --no-prompt
I generated a new project using
sf project generate
and committed here - link. There's actually only thedeveloper-sandbox-def.json
file committed and relevant.Expected result
A new sandbox (name:
dev1clone
) is being created and it's a copy ofdev1
existing sandbox.Actual result
A new sandbox (name:
dev1clone
) is being created and it's a copy of production.Additional information
I fiddled around with different combinations of developer-sandbox-def.json settings and
sf org create sandbox
flags. ThesourceSandboxName
json setting seemed to be always ignored, no matter what.On the other hand, when I run
sf org create sandbox --definition-file config/developer-sandbox-def.json --alias dev1clone --target-org productionAlias --no-prompt --clone dev1
(I added the-clone dev1
flag), it resulted in creating a cloned sandbox correctly. No matter if thesourceSandboxName
was present in developer-sandbox-def.json or not.To sum up, I got to the conclusion that
--clone
flag has always worked well butsourceSandboxName
setting in developer-sandbox-def.json file has had totally no effect.Here are two more SF CLI output examples. In both cases developer-sandbox-def.json looks like described in the Steps To Reproduce section above (it includes
"sourceSandboxName": "dev1"
).The only difference between them is that there's a
SourceId 0GQ1i000000TQESGA4
line when I used the--clone dev1
flag.System Information
I've noticed the issue using Windows 10 & Powershell 7, as well as in cloud GitLab pipelines using Bash.
Thank you very much for your help!
The text was updated successfully, but these errors were encountered: