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

sfdx org create scratch should support key=value pairs as sfdx force:org:create did #2016

Closed
amtrack opened this issue Mar 24, 2023 · 8 comments
Labels
feature Issue or pull request for a new feature

Comments

@amtrack
Copy link

amtrack commented Mar 24, 2023

Is your feature request related to a problem? Please describe.

The new sfdx org create scratch command does not allow overriding values from the configuration file which the sfdx force:org:create command did allow.

What are you trying to do

When creating Scratch Orgs I want to be able to pass dynamic for values like

  • username
  • description
  • orgName
  • release

I don't want to write them to a config file first.

Describe the solution you'd like

Pass overrides as

  • "varargs", similar to
    sfdx org create user [email protected] [email protected] permsets=DreamHouse
  • or as "values" flag, similar to
    sfdx data create record --sobject Account --values "Name='Universal Containers' Website=www.example.com"
  • yet another solution

Describe alternatives you've considered

Staying on sfdx force:org:create, not updating to sfdx org create scratch

Additional context

I'd like to offer my help here.
If you think this is a good idea for a contribution, please tell me which style you'd prefer.

@amtrack amtrack added the feature Issue or pull request for a new feature label Mar 24, 2023
@github-actions
Copy link

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

@git2gus
Copy link

git2gus bot commented Mar 24, 2023

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

@mshanemc
Copy link
Contributor

would new flags cover your use cases instead of values/args

The reason we prefer flags is that they can have help, or support multiple values, and validate allowed options (ex: release only allows certain things).

@amtrack
Copy link
Author

amtrack commented Mar 29, 2023

@mshanemc Great idea! Love it!
And yes, this would cover my use cases.
If there are many new flags, maybe using the helpGroup would make sense for readability of the help page.

@mshanemc
Copy link
Contributor

oh, a help group just for the "flags that override the config file" ? Makes sense.

@amtrack
Copy link
Author

amtrack commented Mar 30, 2023

I still like the idea of creating new flags (especially for fields that caused trouble in the past like "release").
I counted ~10 new flags for writeable standard fields on ScratchOrgInfo.

What about custom fields on ScratchOrgInfo?
Do you know if someone is using the varargs to populate custom fields?
This could also be a use case.

@mshanemc
Copy link
Contributor

I don't have any data about custom fields on ScratchOrgInfo.

We also don't read the varArgs in telemetry (trying to keep confidential data out of logs), only which flags are being used (but not values). So we don't have data. I'm hoping people will tell us, like you did, about what they need on the new command.

@amtrack
Copy link
Author

amtrack commented Mar 30, 2023

I just raised this question in the cli-friends slack channel...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue or pull request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants