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

Add a way to suppress interactive prompts from the CLI #4037

Closed
Abstrct opened this issue Mar 19, 2024 · 3 comments
Closed

Add a way to suppress interactive prompts from the CLI #4037

Abstrct opened this issue Mar 19, 2024 · 3 comments
Assignees
Labels
component:cmd type:feature To implement new feature.

Comments

@Abstrct
Copy link

Abstrct commented Mar 19, 2024

There are a number of cases in which an interactive response is now required by the CLI. Some examples of this include:

  • The acknowledgement/choice about data collection for Ignite prompts the first time the CLI is used
  • If the CLI detects a project is not using the newer buf build system, it prompts to ask the user if an upgrade should happen

These interactive commands provide a complexity when using ignite within automated processes, especially containers.

Solutions
I believe this could be resolved with 3 possible solutions, although I'm sure other perfectly acceptable solutions exist too.

  • A --non-interactive mode flag
  • A setting within ~/.ignite
  • An IGNITE-NON-INTERACTIVE environment variable

Any of these methods that would suppress these prompts would ensure commands are not stalled by unexpected prompts.

Difference to --yes
There is a flag already in Ignite, somewhat similar in spirit, used purely to bypass the transaction signing confirmation. The --yes flag. This is similar in that is does bypass an otherwise interactive moment in the CLI, but I believe it differs due to its lack of negative choice.

The key issue in this particular feature request is that the automated system does not know what interactive question is being asked. I believe this makes the --yes flag inappropriate, as I may not want to blindly choose yes on a prompt that could related to data collection, migration of one build system to another, or other questions that I'm not present to read and understand.

For that reason, the --yes command is perfect for the tx sub commands of the CLI, but I don't feel like it is the best solution for these other instances of interactivity in the CLI.

@salmad3 salmad3 added type:feature To implement new feature. request Feature request. labels Mar 26, 2024
@Pantani
Copy link
Collaborator

Pantani commented Apr 4, 2024

@Abstrct, thanks for the suggestions. We already have the --yes flag. I agree the name could be more intuitive. IMHO, we should only rename and fix the places that are not passing the interactive from the CLI

@salmad3 salmad3 added component:cmd and removed request Feature request. labels May 29, 2024
@Pantani
Copy link
Collaborator

Pantani commented Jun 4, 2024

@Abstrct, the -y is working again for all cases. It is the same idea as the --non-interactive flag. I will close this issue because we don't have plans to support both flag since is redundant

@Pantani Pantani closed this as completed Jun 4, 2024
@Pantani
Copy link
Collaborator

Pantani commented Jun 4, 2024

thanks for the suggestion @Abstrct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cmd type:feature To implement new feature.
Projects
Status: Done
Development

No branches or pull requests

3 participants