tetratelabs / tetrate-service-bridge-sandbox

Deploy Tetrate Service Bridge Demo on Azure Kubernetes Service (AKS), Google Kubernetes Engine (GKE) and/or Elastic Kubernetes Service (EKS) using Terraform
Apache License 2.0
12 stars 10 forks source link

Fail early if there is any error #251

Closed nacx closed 1 year ago

nacx commented 1 year ago

This configures the Makefile to fail early if an error occurs.

The current setup uses ; to concatenate the commands to run, but that ignores failures and continues, using the last command exit code for the overall operation. That last command is usually a cd .., which results in always succeeding, and the provisioning process is not aborted if any previously required step failed.

This is quite annoying as you don't know when things went wrong, especially when destroying stuff, as you may end up removing the local status while leaving garbage there.

This PR forces an exit on the first failure so that the process does not continue when it shouldn't.

smarunich commented 1 year ago

oh indeed a very needed one!