Shopify / shopify-cli-extensions

MIT License
24 stars 9 forks source link

Remove next-step templates #340

Closed isaacroldan closed 2 years ago

isaacroldan commented 2 years ago

We want to control how extensions URLs are presented to the users from the CLI. In order to provide a consistent output with the rest of the CLI as well as having more flexibility to provide detailed instructions without being lost in the logs (since we serve frontend, backend and extensions at the same time, it gets messy)

This PR removes all next-step templates and that info will be handled by CLI now.

dmhenry commented 2 years ago

This affects CLI 2.0 as well, so I don't think we can just remove it across the board. I think this ties into the next phase for the Development Extension Server which includes structured logging and better integration between the Dev Server and CLI 3.0. I don't know if this would work, but I'm wondering if the Dev Extension Server should not be writing to stdout at all, rather it could use some kind of communication channel to send structured logs back to the CLI, and it would write to stdout with the option to do filtering based on the structured logging metadata. Alternatively (or additionally), we could pass some kind of user-agent field down from the CLI to the Extension Server for the purpose of having a way to differentiate between CLI 2.0 & 3.0, thereby allowing for different behavior.

CC: @vividviolet @isaacroldan

isaacroldan commented 2 years ago

Agree that we need a better communication between CLI and extension server, we discussed this in the CLI team and decided that this work should be done after editions and in the meantime we needed a way to show the URLs that matches the current style of the CLI and is easier to read.

Is the extension server being used in the open for CLI 2.0? Can we detect somehow if we are using one or the other and not show the next-steps in Cli 3.0?

dmhenry commented 2 years ago

We are indeed using the extension server with CLI 2.0 but there is no indication of the identity of the caller. This is where my suggestion of adding some sort of User-Agent (or whatever) to the config would come in handy.

dmhenry commented 2 years ago

Another solution, and one which wouldn't pollute the Dev Extension Server, is to move the existing next steps to the CLI 2.0.

vividviolet commented 2 years ago

Another idea is to fix the version of the Go Binary to one that still has the next steps included and never update it. That way CLI 2.0 continues to work and new changes only affect CLI 3.0.

isaacroldan commented 2 years ago

Another idea is to fix the version of the Go Binary to one that still has the next steps included and never update it. That way CLI 2.0 continues to work and new changes only affect CLI 3.0.

I think this one makes the most sense, taking into account that CLI 2.0 will be around but not updated, we can fix a version of the extension server and continue doing improvements for CLI 3.0