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
All jobs are completed and successful even though something went wrong with "init", "plan" or "apply".
Why? Wouldn't it be better to fail so we can collect metrics and do something about it without having to check pod logs?
The text was updated successfully, but these errors were encountered:
@francardoso93 I agree that it's odd that the pod completes and is marked as successful when something goes wrong. I personally haven't had an issue checking logs when I see something didn't occur that I expected to occur, but I think you're right that a failure metric is way more useful than waiting for other errors to happen if tf didn't run.
The script that powers the tfo runner (in v0.3.x) is https://github.com/isaaguilar/terraform-operator/blob/master/docker/terraform/run.sh. I think it'd be pretty easy to inject an exit flag that gets updated on init, plan, or apply events, then exit with that exit code. My problem with updating this script is actually a big flaw in TFO's design which is that the runners aren't version-able. (NOTE I'm fixing the runner-versioning flaw in v0.4.0+ releases).
So what I'll do is test out updating the script with an exit code flag and see if that works to get a pod to fail without any repercussions.
PS In v0.4.0+ versions, init, plan, and apply are all executed in different pods and do fail upon error. This stops the terraform workflow and even updates the terraform resource's Status. I'm still working on docs and testing for this design change.
All jobs are completed and successful even though something went wrong with "init", "plan" or "apply".
Why? Wouldn't it be better to fail so we can collect metrics and do something about it without having to check pod logs?
The text was updated successfully, but these errors were encountered: