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

"org create sandbox" can only be used with Developer licenseType #2026

Closed
thomasminney opened this issue Mar 29, 2023 · 2 comments · Fixed by salesforcecli/plugin-org#667
Closed
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@thomasminney
Copy link

Summary

--license-type cannot be used with --definition-file. So if using --definition-file (e.g. to set sandbox description, autoActivate, etc), licenseType can only be specified in the definition file.

Regardless of what is set in the definition file, the default value of --license-type overwrites this.

Bug is possibly in sandboxRequest.ts where capitalizedVarArgs holds the default value of --license-type when the arg was not provided. This variable overwrites the license type value read from the definition file in sandboxDefFileContents.

Also the "org create sandbox" command only seems to support license type values of Developer, Developer_Pro, Partial, and Full whereas in the Tooling API, and SandboxInfo and SandboxProcess objects, the values DEVELOPER, DEVELOPER_PRO, PARTIAL, and FULL are supported. The "org create sandbox" should support the upper case variations only or be case insensitive.

Steps To Reproduce:

Run sfdx org create sandbox --license-type Developer_Pro --definition-file sandbox-def.json to get exclusive args error.

Run sfdx org create sandbox --definition-file sandbox-def.json with sandbox-def.json:

{
	   "autoActivate": true,
	   "licenseType": "DEVELOPER_PRO",
	   "sandboxName": "mysandbox",
	   "templateId": ""
}

to get the --license-type overwrite bug

Expected result

Definition file value for licenseType should be used when --license-type is not specified in the command

Actual result

--license-type overwites the "licenseType" value in the definition file when --license-type is not specified

System Information

cmd.exe
{
"cliVersion": "sfdx-cli/7.193.2",
"architecture": "win32-x64",
"nodeVersion": "node-v18.14.2",
"osVersion": "Windows_NT 10.0.22621",
"shell": "cmd.exe",
"rootPath": "C:\Users\thomasminney\AppData\Local\sfdx\client\7.193.2-380b8be",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.1.5 (core)",
"@oclif/plugin-commands 2.2.10 (core)",
"@oclif/plugin-help 5.2.8 (core)",
"@oclif/plugin-not-found 2.3.22 (core)",
"@oclif/plugin-plugins 2.4.2 (core)",
"@oclif/plugin-search 0.0.14 (core)",
"@oclif/plugin-update 3.1.7 (core)",
"@oclif/plugin-version 1.3.0 (core)",
"@oclif/plugin-warn-if-update-available 2.0.31 (core)",
"@oclif/plugin-which 2.2.16 (core)",
"apex 2.2.5 (core)",
"auth 2.7.8 (core)",
"community 2.2.5 (core)",
"custom-metadata 2.1.7 (core)",
"data 2.3.6 (core)",
"info 2.6.0 (core)",
"limits 2.3.8 (core)",
"org 2.5.0 (core)",
"packaging 1.16.2 (core)",
"schema 2.3.3 (core)",
"settings 1.4.2 (core)",
"signups 1.4.7 (core)",
"source 2.8.0 (core)",
"telemetry 2.1.3 (core)",
"templates 55.4.4 (core)",
"trust 2.4.4 (core)",
"user 2.3.5 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
"salesforce-alm 54.8.5 (user)",
"sfdx-cli 7.193.2 (core)",
"sfdx-git-delta 5.13.3 (user)"
]
}

@thomasminney thomasminney added the investigating We're actively investigating this issue label Mar 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.

@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label May 2, 2023
@git2gus
Copy link

git2gus bot commented May 2, 2023

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

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants