timoni
timoni copied to clipboard
Dry-run status code when `--force` flag is not present
Currently a dry-run without a force will display something like that for immutable resources
2:20PM ERR i:object-name> Deployment/namesapce/my-app immutable (server dry run)
However it will exit with status 0. Imo this is wrong because if we remove the --dry-run
and the object doesn't have the action.timoni.sh/force
annotation, the apply will fail.
I propose we show an ERR and exit with an error status (maybe 2 to identify immutable error versus runtime error) if force
arg is not used and action.timoni.sh/force
is not set on that resource.
If force
or action.timoni.sh/force
is present, then we can set a WARN
or something like this and exit 0.