Skip to content

Rethink interactive commands? #1080

@carolynvs

Description

@carolynvs

I was reading the PR for adding porter parameters generate (where we are considering adding branching logic to skip adding parameters or default them based on the values in the bundle) and realized that these interactive generation commands have become complicated and I'm not confident that they are the most helpful UX.

Due to limited terminal space, and a bug in the survey library that we use, we are trying to keep the questions as short as possible. When people really may need more documentation and context to understand what is going on.

A mistroke in the workflow means that you have to keep going and then start over or manually edit the file anyway.

We already have similar commands, which work differently:

  • porter create generates a well commented porter.yaml with links to our documentation site, ready for the user to edit.
  • porter credentials edit pops the user into their preferred editor to edit the credentials in YAML.

Before we keep doubling down on this UX (for parameters), and a codebase that honestly I am unconfident of every time I have to review (because of its interactive nature is difficult to automate testing), I'd like us to step back and think about our preferred UX for editing files. Is there a commonality between the porter.yaml, credentials/parameter sets, and eventually the porter user config file? What is a good way to create it and make it easy for the user to edit it while giving them support so that they understand the various configuration options available?

I'm leaning towards an apache-style config where we generate a well-commented file (perhaps with comented out config that doesn't yet apply), with links to our website that we provide commands to assist with listing, finding the file location and opening in an editor. Without the interactive prompts.

Are there other examples from existing tools that we like? Suggestions welcome!

Metadata

Metadata

Labels

2 - 🍕Pizza should be eaten dailydocsMarkdown ahoy! Updates needed on porter.sh or in dev docs.user experience 🌈💖Make it easier for everyone to use Porter

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions