CumulusCI
CumulusCI copied to clipboard
Prompt Org Configs when Org Does Not Exist and Command Runs Against It
As a CCI user, I often think of what flow, task, or other action before I think of what kind of org to run that action against. It would be helpful to have a prompt with all available org configs display whenever I target and org that has not yet been created.
Example: When I run cci flow run dev_org --org <orgthatdoesnotexist>
, then a prompt displays as follows.
Org information could not be found. Would you like to create one with the following config:
1. dev
2. qa
3. release
... [lists all existing org configs]
Describe alternatives you've considered
- Add a config parameter to commands which will create an org with config:
cci flow run dev_org --org <orgthatdoesnotexist> --config dev
- Associating a default config with a task/flow so that whenever you run that task/flow it will use that config if no scratch org exists.
- Having a default config for a project so that it will always be used if an org doesn't exist.
@Julian88Tex interesting idea. I definitely like this a lot better with the prompt than without (since the user could have simply made a typo for an org that already exists).
On a related note, there's an idea we're exploring about adding a way to specify a "setup flow" for an org config in cumulusci.yml. This flow would be run automatically when the org is created. So in this world, you would need to shift your thinking from which flow you want to run to what type of org you want to work in. But you would no longer need to keep track of which flow is the right one to set up that type of org. And you would not run the risk of using a flow like dev_org in an org where it had already run, due to forgetting or not realizing that the org already exists.
I'm curious whether this sounds like something you would use, and would be happy to meet and talk through your use cases to make sure we're solving the right problem(s).
@davisagli hm, that's a really interesting one. I definitely like the thought behind it. In some ways, it's almost like the next level of what I've described in terms of automation. The big plus I see is a strong tie between orgs & flows which I think already exists in most use cases but isn't that explicit in CCI.
Would definitely love to discuss this more and beta test time willing :-). I'm very curious how errors would be handled. Ideally, there would be some visual indication that the setup flow errored for a given org.