Open b4nst opened 8 months ago
We do look for the force annotation and we repot the dry run action as created
https://github.com/stefanprodan/timoni/blob/f44c6a8f11d915998616ae0394e73b760bd70439/cmd/timoni/dyff.go#L106-L112
I agree that we should return a non zero exit code for immutable
and without --force
.
I'll give it a try this week if I find some time.
Currently a dry-run without a force will display something like that for immutable resources
However it will exit with status 0. Imo this is wrong because if we remove the
--dry-run
and the object doesn't have theaction.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 andaction.timoni.sh/force
is not set on that resource. Ifforce
oraction.timoni.sh/force
is present, then we can set aWARN
or something like this and exit 0.