You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two potential improvements on the current condition of the .zarf-state.yaml file.
Add a check (and warning log / confirmation dialog if not in --confirm) that a .zarf-state.yaml file already exists.
Right now the code only checks for a .zarf-state.yaml file in the current directory. This can create several issues, most of them revolving around the fact that we will be leaving behind lingering state files (zarf destroy only removes the state file if it's in the same directory you ran the command from) and the fact that if we init in one directory and switch directories before the zarf deploy command we will no longer be able to find the state file to reference which leads to an unclear set of logs.
This can be replicated by running the following commands: ./zarf init mkdir testdir && cd testdir ../zarf destroy --confirm ls -la ../.zarf-state.yaml -> it is still there after it was supposed to be destroyed.
The text was updated successfully, but these errors were encountered:
this is a valid point, I wouldn't be opposed to just doing an /etc/zarf thing instead, might actually be cleaner to put all state things there instead. Thoughts?
Two potential improvements on the current condition of the
.zarf-state.yaml
file.Add a check (and warning log / confirmation dialog if not in
--confirm
) that a.zarf-state.yaml
file already exists.Right now the code only checks for a
.zarf-state.yaml
file in the current directory. This can create several issues, most of them revolving around the fact that we will be leaving behind lingering state files (zarf destroy
only removes the state file if it's in the same directory you ran the command from) and the fact that if we init in one directory and switch directories before thezarf deploy
command we will no longer be able to find the state file to reference which leads to an unclear set of logs.This can be replicated by running the following commands:
./zarf init
mkdir testdir && cd testdir
../zarf destroy --confirm
ls -la ../.zarf-state.yaml
-> it is still there after it was supposed to be destroyed.The text was updated successfully, but these errors were encountered: