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

force:org:create ignores apiVersion config value when deploying settings #1719

Closed
cristiand391 opened this issue Sep 22, 2022 · 5 comments
Closed
Assignees
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@cristiand391
Copy link
Member

cristiand391 commented Sep 22, 2022

Summary

force:org:create ignores apiVersion config value so it always default to the max api version supported by the org for the settings deployment.

Steps To Reproduce:

Repository to reproduce: dreamhouse-lwc

  1. Set apiVersion: sfdx config:set apiVersion=47.0 --global
  2. run DEBUG=sf:deploySettingsViaFolder sfdx force:org:create -s -f config/project-scratch-def.json -a dreamhouse
  3. See output:
WARNING: apiVersion configuration overridden at "47.0"
  sf:deploySettingsViaFolder DEBUG deploying to apiVersion: 56.0 +0ms

Expected result

Respect apiVersion value

Actual result

The code always gets undefined so it defaults to the max api supported by the org.

System Information

sfdx version --verbose --json

{
  "cliVersion": "sfdx-cli/7.169.1",
  "architecture": "darwin-x64",
  "nodeVersion": "node-v16.16.0",
  "pluginVersions": [
    "@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.0 (core)",
    "apex 1.2.0 (core)",
    "auth 2.2.5 (core)",
    "community 2.0.1 (core)",
    "config 1.4.19 (core)",
    "custom-metadata 2.0.0 (core)",
    "data 2.1.2 (core)",
    "generator 2.0.2 (core)",
    "info 2.1.0 (core)",
    "limits 2.0.1 (core)",
    "org 2.2.3 (core)",
    "packaging 1.9.1 (core)",
    "schema 2.1.3 (core)",
    "signups 1.2.0 (core)",
    "source 2.0.13 (core)",
    "telemetry 2.0.0 (core)",
    "templates 55.1.0 (core)",
    "trust 2.0.4 (core)",
    "user 2.1.2 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
    "salesforce-alm 54.8.1 (core)"
  ],
  "osVersion": "Darwin 20.6.0",
  "shell": "zsh",
  "rootPath": "/Users/cdominguez/.nvm/versions/node/v16.16.0/lib/node_modules/sfdx-cli"
}
@cristiand391 cristiand391 added the bug Issue or pull request that identifies or fixes a bug label Sep 22, 2022
@cristiand391 cristiand391 self-assigned this Sep 22, 2022
@git2gus
Copy link

git2gus bot commented Sep 22, 2022

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

@sharad272
Copy link

Hi,
I am also facing this issue while creating scratch orgs. I have made changes in sfdx-project.json but it was of no use.

error running force:org:create: a scratch org was created with username [email protected], but the settings failed to deploy due to: not available for deploy for this api version

Can you please help?

@cristiand391
Copy link
Member Author

@sharad272 you can try using the force:org:legacy:create which should respect the apiVersion config. We might have this fixed for the current force:org:create command in the RC next week.

@sharad272
Copy link

force:org:legacy:creat

@cristiand391 Thanks! This is working for now.

@shetzel
Copy link
Contributor

shetzel commented Oct 6, 2022

Fixed in CLI version 7.171.0

@shetzel shetzel closed this as completed Oct 6, 2022
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

No branches or pull requests

3 participants