-
Notifications
You must be signed in to change notification settings - Fork 61
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
Autoclone with failed command needs more communication #1252
Comments
Agreed. This is a confusing experience. Service versions are immutable so we can't undo the new service version. We should see if we can validate the flag value before executing the handler logic. |
Might also be worth checking this broadly across the CLI (e.g. any where a new service version might be created). |
This is a slippery slope, of course.. if we attempt to validate the API input in the CLI before issuing the API request, then we're forever stuck with doing that for every API request. We'd also need to decide whether this belongs in the CLI itself or in |
Yeah we used to have go-fastly AND the CLI validate API inputs but then we removed that sort of logic to avoid being locked to a behaviour that we (go-fastly, CLI) don't control |
Proposal: what if the CLI 'remembered' that it had autocloned to create a new draft version, and if the subsequent API call failed, it emitted a specific detailed message telling the user what had happened (including the version number of the new draft version)? |
re: proposal -- that works for me I think |
Describing
The CLI has a useful flag
--autoclone
. However, I’m seeing confusing behavior when using it.Assuming my service is currently on version 1 (active), if I use
--autoclone
and I type an invalid command, even something like this:I get an error message:
Unfortunately by this time it seems the cloning by --autoclone has already happened, so if I follow up with another command:
I will end up on version 3.
I get it because I understand the cloning happens separate from the backend create, however the CLI doesn’t say this so I found it confusing. It results in a mismatch between the user's mental model of the state of the service and the actual state.
Proposed fix
More communication can help here. I’m thinking that a stdout message when the new version has been created would help clarify. That way, if an error occurs you can still see that the version has been created even though your desired operation never went through to completion.
The text was updated successfully, but these errors were encountered: