Closed shalako closed 6 years ago
It seems like the issue here is that your state file was called state.json
, rather than bosh-state.json
, which caused the first delete-env
to fail because it was referring to a non-existent file and the second to succeed. However, the fact that it failed on the disk migration is curious.
Now, given that you didn't provide the --state
flag to the first delete-env
, I'm wondering if the CLI defaults the state file name to bosh-state.json
. If that's the case, it conflicts with the bosh-deployment
documentation and should probably be changed.
@tjvman Thank you for the replies.
Now, given that you didn't provide the --state flag to the first delete-env, I'm wondering if the CLI defaults the state file name to bosh-state.json. If that's the case, it conflicts with the bosh-deployment documentation and should probably be changed.
Will you use this story to represent this action item?
If the CLI didn't output Succeeded
when the operation failed, I would not have tried to run additional commands and been confused when they failed. More evidence for #108.
to clarify that command is a perfectly valid command hence we cannot just make it fail. there is no consistent way for us to know given that all our commands are idempotent. if you had any vms associated with the first command (uses bosh-state.json) then cli would have deleted them the first time, and subsequent time would have stated that there is nothing to do.
looking again at the output cli i do see that cli did indicate that it didnt have to do anything ("No deployment state file found") to complete with the given combination of flags. thats where the problem lies -- there is no easy way for us to know with what combination of flags you ve created env hence we cant know whats the correct combo of flags that you need to successfully delete.
do you think that "no deployment state file" info line should be reworded to indicate possibility that provided set of flags were wrong?
Sent from my iPhone
On Feb 13, 2017, at 10:53 AM, Shannon Coen notifications@github.com wrote:
@tjvman Thank you for the replies.
Now, given that you didn't provide the --state flag to the first delete-env, I'm wondering if the CLI defaults the state file name to bosh-state.json. If that's the case, it conflicts with the bosh-deployment documentation and should probably be changed.
Will you use this story to represent this action item?
If the CLI didn't output Succeeded when the operation failed, I would have tried to run additional commands and been confused when they failed. More evidence for #108.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
No deployment state file found.
is a meaningful error. The problem is that the last line of the output is Succeeded
, so I will ignore anything above that. Stop printing Succeeded
and the problem would be solved because the useful message would be noticed.
As long as the CLI outputs Succeeded
as the last line, any failure in the requested operation will go unnoticed.
'No deployment state file found.' is a meaningful error
it's not an error though but rather indication of perceived state. may be rephrasing it would indicate that better: "Nothing to delete since deployment state file is not present."
For what it's worth, I prefer the current wording. But it doesn't matter; since Succeeded
is the last line in the output everything before it will be ignored. Then I make incorrect assumptions when I discover later that the intended state change didn't happen when the CLI told me it did.
This seems like a great use case and area to improve the UX. In an effort to limit the number of issues we have open, I'm going to close this in favor of #365 since it feels like this CLI "succeeded" UX all falls under the same boat. If you think this should have more of its own conversation, feel free to reopen.
Upon recreating the env, bosh tries to migrate the disk and fails
deploy.sh
If we run a destroy script with all the same options we get a more convincing result
destory.sh
I would have like to see the delete-env fail more clearly when all the necessary options weren't provided.