I’m sorry, I needed to dump this rage comment some...
# general
o
I’m sorry, I needed to dump this rage comment somewhere. I’m trying out pulumi environments and I’ve spent the last hour carefully crafting the new env inside a
pulumi env edit
so dear pulumi team this is NOT how this “edit” behavior is supposed to work if you make a mistake, your stuff DOES NOT GO AWAY when you try to save it! just look at
kubectl edit
and what happens when you submit an incorrect config - the editor pops right back with a comment explaining the error sorry again
thank you for the
state move
command though, much needed
h
Oof, that really should not have happened!
esc edit
is _supposed_ to re-open the file if the update fails to validate, so I'd like to help track down what went wrong. Can you give me a few details about how you ran the command? Was it the dedicated
esc
binary, or are you using
pulumi env
? What version was it? Are you comfortable sharing what the error was?
o
sure thing it’s
pulumi env
and the configured editor is
neovim
the version is latest I suppose, I update frequently the error was generic - I think I used an improper variable name when constructing
pulumiConfig
from imported envs or smth. Btw, another slightly annoying this is the automatic type conversion when setting values from CLI: basically, if you have a config for a version of something and try changing it via
pulumi env set
, it’ll automatically convert to double, which is odd. The only way that works is either
pulumi edit
or changing it from the UI.
This is what it looks like after the error: I guess it was supposed to become a comment in neovim, but neovim just exited and the error got printed out to stdout
h
yeah,
set
interprets the value given to it as a yaml value, which can end up being pretty surprising sometimes. you can work around it by double quoting a value like
pulumi env set <env> <path> '"1.23"'
. there is a recent change that adds a --string flag to force esc to interpret the value given to it as a string, but I'm not sure whether it's available in
pulumi env
yet
I'll let you know when this is fixed, I'm sorry this happened to you
o
Thanks! And sorry for the rant, I just needed to vent somewhere 🙂
h
so I've tracked this down a bit more. it turns out that the pulumi cli is importing an older version of esc that exhibits this problem. there is a fix included in esc v0.12.0, so I'll work on getting that dependency updated. in the mean time consider using latest version of the dedicated esc cli to avoid hitting this issue for now - it works the same way as
pulumi env