Skip to content

Add interactive mode to template app command #1335

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

TheoBrigitte
Copy link
Member

@TheoBrigitte TheoBrigitte commented May 31, 2024

What does this PR do?

This PR adds an interactive mode to the template app command. This mode allows users to create a new app interactively by selecting a catalog and a catalog entry from a list of available options.

What is the effect of this change to users?

Users can now create a new app interactively by running kubectl gs template app --cluster-name myCluster --interactive and following the prompts.

What does it look like?

Screenshare.-.2024-06-01.12_03_16.AM.mp4

What is needed from the reviewers?

Review the code and test the new interactive mode.

Do the docs need to be updated?

Yes online doc needs to be updated at https://docs.giantswarm.io/vintage/use-the-api/kubectl-gs/template-app/

Should this change be mentioned in the release notes?

  • CHANGELOG.md has been updated

Is this a breaking change?

No, default bevahior is unchanged.

@TheoBrigitte TheoBrigitte requested a review from a team as a code owner May 31, 2024 21:56
@TheoBrigitte TheoBrigitte self-assigned this May 31, 2024
@TheoBrigitte TheoBrigitte requested a review from a team June 3, 2024 12:40
@marians
Copy link
Member

marians commented Jun 3, 2024

This is an interesting experiment, and since some interactive mode or wizard mode in the CLI has been discussed here and there, it's nice to actually try out an example.

I wonder: what motivated you to work on this? What problem are you trying to solve?

As a general notice: I think it makes sense to invest effort into an interactive mode only if we know we want to pursue this for all or most commands.

When testing the implementation here, I think it would require more work to make me want to use it. Here are some things I don't like in particular:

  • I should not be required to set a cluster name via the command line flag. Instead, if not given, the interactive mode should allow me to select a cluster.

  • There should be some guidance, like what information am I supposed to give in this step? E. g. "Select a catalog to install an app from".

  • The screen layout is very unexpected to me, everything appears displaced. Interactive mode takes the entire terminal window, and the input prompt is in the bottom. Details on the selected catalog appear in the top right (which can be very far away, depending on the window size).

  • Loading catalog entries seems to take quite some time (several seconds). I'd like to see some feedback while it happens.

My guess is that it would require a good deal more work to make this a nice experience, and given the limited resources we have, I wouldn't want to give this task to any of our teams currently.

@TheoBrigitte
Copy link
Member Author

TheoBrigitte commented Jun 3, 2024

I wonder: what motivated you to work on this? What problem are you trying to solve?

I wanted to replicate the experience of deploying an app via Happa into CLI.
As I am currently a heavy user of app installation this was for me more effective than going through Happa and clicking around.

  • I should not be required to set a cluster name via the command line flag. Instead, if not given, the interactive mode should allow me to select a cluster.

I agree and will change this.

  • There should be some guidance, like what information am I supposed to give in this step? E. g. "Select a catalog to install an app from".

Will see how feasible is that

  • The screen layout is very unexpected to me, everything appears displaced. Interactive mode takes the entire terminal window, and the input prompt is in the bottom. Details on the selected catalog appear in the top right (which can be very far away, depending on the window size).

That's a drawback from the library I used here. Will see if there's a way to improve this.

  • Loading catalog entries seems to take quite some time (several seconds). I'd like to see some feedback while it happens.

I will add some feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants