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

Snapshot Scratch Orgs created with wrong language #2643

Closed
petter-eikeland opened this issue Jan 13, 2024 · 8 comments
Closed

Snapshot Scratch Orgs created with wrong language #2643

petter-eikeland opened this issue Jan 13, 2024 · 8 comments
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@petter-eikeland
Copy link

Summary

When creating a snapshot scratch org, the language is not set the same as the snapshot. This is both an issue for deploying metadata to the snapshot scratch org (e.g. "startsWith" error #1921) and for package version creation (e.g. "startsWith" error and Profile names in wrong language in Apex Tests). Currently, only "orgName" and "snapshot" are the allowed attributes when creating a snapshot scratch org. Could perhaps the SF CLI accept the "language" attribute for snapshot scratch org creation as a workaround, similar to #1962? I assume the CLI updates the language in both the scratch org, and the build org post creation when this attribute is set.

Steps To Reproduce

  1. Create scratch org with "language": "en_US"
  2. Create snapshot of scratch org
  3. Create snapshot scratch org

Expected result

Snapshot scratch org should have default org language & User User language = en_US

Actual result

Snapshot scratch org created in wrong language (Norwegian for me)

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.24.4",
  "nodeVersion": "node-v20.10.0",
  "osVersion": "Darwin 22.6.0",
  "rootPath": "/Users/user/.local/share/sf/client/2.24.4-c9898a2",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.5 (core)",
    "@oclif/plugin-commands 3.1.0 (core)",
    "@oclif/plugin-help 6.0.10 (core)",
    "@oclif/plugin-not-found 3.0.8 (core)",
    "@oclif/plugin-plugins 4.1.15 (core)",
    "@oclif/plugin-search 1.0.11 (core)",
    "@oclif/plugin-update 4.1.7 (core)",
    "@oclif/plugin-version 2.0.11 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.9 (core)",
    "@oclif/plugin-which 3.0.14 (core)",
    "@salesforce/cli 2.24.4 (core)",
    "1commerce 0.0.10 (user)",
    "apex 3.0.17 (core)",
    "auth 3.2.0 (core)",
    "community 3.0.12 (user)",
    "data 3.0.14 (core)",
    "deploy-retrieve 3.1.0 (core)",
    "info 3.0.15 (core)",
    "limits 3.1.2 (core)",
    "marketplace 1.0.16 (core)",
    "org 3.2.2 (core)",
    "packaging 2.1.0 (user)",
    "schema 3.1.0 (core)",
    "settings 2.0.15 (core)",
    "signups 2.0.15 (user)",
    "sobject 1.1.0 (core)",
    "source 3.1.3 (core)",
    "telemetry 3.1.9 (core)",
    "templates 56.0.9 (core)",
    "trust 3.3.1 (core)",
    "user 3.2.1 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.1.1 (user)",
    "sfdmu 4.32.2 (user)",
    "sfdx-browserforce-plugin 4.0.0 (user)"
  ]
}

Additional information

@petter-eikeland petter-eikeland added the investigating We're actively investigating this issue label Jan 13, 2024
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.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Jan 13, 2024
@mshanemc
Copy link
Contributor

mshanemc commented Jan 16, 2024

I assume the CLI updates the language in both the scratch org, and the build org post creation when this attribute is set.

On a non-snapshot org, we send that when creating the org [it becomes part of ScratchOrgInfo] and don't do anything post-create.

Currently, only "orgName" and "snapshot" are the allowed attributes when creating a snapshot scratch org. Could perhaps the SF CLI accept the "language" attribute for snapshot scratch org creation as a workaround, similar to #1962?

The signups team that owns scratch org creation controls what properties the API accepts. The CLI/VSCode currently block some fields here https://github.com/forcedotcom/sfdx-core/blob/891318acad3b213418f0bbedce961989be86014d/src/org/scratchOrgInfoGenerator.ts#L45-L46

If you're open to trying it, you can remove language from that list and see what happens (if it works fine, we'd take a PR for that change).

The best would be for team signups to fix their snapshot language problem.

@petter-eikeland
Copy link
Author

Thank you for your helpful suggestions 😊

When removing the blocker locally, the error changed from

Creating Scratch Org... Error
Error (1): Org snapshots don’t support one or more options you specified: language

to

Creating Scratch Org... Error
Error (1): Unsupported snapshot signup request fields: Language.

I can also see, when running sf doctor, in the command-stdout.log, that a POST is being made to this endpoint when removing the blocker:
.../services/data/v59.0/sobjects/ScratchOrgInfo

Thus, it seems like the API is indeed blocking this signup value as well. I assume I need to create a Salesforce Case then? Or is there a team signups GitHub Repo I don't know about? 😅

@shetzel
Copy link
Contributor

shetzel commented Jan 17, 2024

Yes, you'll need to open a case with support about this. Thanks for reporting and all your troubleshooting efforts!

@shetzel shetzel closed this as completed Jan 17, 2024
@petter-eikeland
Copy link
Author

FYI @shetzel, feedback from Salesforce Support:

Product Team has confirmed that a new decision was taken to start supporting languages from release 250/GA.(Currently its 248 Spring'24 release which is going)

Thus, Shane's proposed changed can be planned for by the Salesforce CLI team for Winter '25 Release

@shetzel
Copy link
Contributor

shetzel commented Feb 12, 2024

Internal work item: W-15021586

@petter-eikeland
Copy link
Author

@shetzel
image
Seems like this is ready for the Summer '24 release already

SF release notes

@shetzel
Copy link
Contributor

shetzel commented Apr 23, 2024

@petter-eikeland - Yep! As of: forcedotcom/sfdx-core#1055, which is currently in the release candidate and will be promoted to production tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants