What should be the order of calls for the automati...
# automation-api
w
What should be the order of calls for the automation api equivalent of repairing stack state? I think that config should still be set before doing the export / import, or does it not matter? (I did a repair at one point before doing this and config was wiped from the ui) So looks like the following makes sense and is consistent with the above: • var stack = LocalWorkspace.CreateOrSelectStackAsync • stack.Workspace.InstallPluginAsync • stack.SetAllConfigAsync • stack.ExportStackAsync • // repair stack • stack.ImportStackAsync
l
It should not matter. But remember that config is only persisted in backends on update, not on each intermediate
config set
command. I would expect you to need to do something along the following: 1. export 2. // fix 3. import 4. (setup commands, install plugins, config, etc) 5. refresh/update
w
@lemon-agent-27707 Follow up question... if I import the stack unchanged, i.e. not edited so still with pending resources, should they be preserved or would you expect pending resources to be stripped by the import?
l
running an export/import does indeed strip pending deletes
w
Pending deletes or pending resources in general?
I ask because I think my eks cluster state was deleted while I was playing around with this stuff
(My stack failed for an unrelated reason before eks cluster finished in aws - takes 10-15m) So I was mucking about with stack repair in the meantime and at some point the state got deleted
I just want to make sure I fully understand how an interactive repair might work ... e.g. if I don't make any changes then I should not call import afterwards, otherwise pending resources will be stripped.
And if that's the case it kinda feels like it would be safer to not strip pending resources by default
l
👍 1