cluster.dev icon indicating copy to clipboard operation
cluster.dev copied to clipboard

Successful output in case of errors in the applying process

Open kinseii opened this issue 1 year ago • 4 comments

Problem: In the applying process, if there was an error, the final output doesn't let you know about it:

19:53:07 [INFO] Applying unit 'qwerty-aks-us-1.test-configmap':
19:53:07 [INFO] [qwerty-aks-us-1][test-configmap][init] In progress...
19:53:07 [INFO] [qwerty-aks-us-1][test-configmap][init] executing in progress... 0s
19:53:08 [INFO] [qwerty-aks-us-1][test-configmap][init] Error
19:53:08 [INFO] The project was successfully applied

Cluster.dev Version: cdev version v0.9.5

P.S. To clarify, there was an error in the backend container name

kinseii avatar Aug 02 '24 02:08 kinseii

I did more research and came to the conclusion that it's a problem between backends in different subscriptions. We use Azure, so we have to switch between subscriptions with the az account set -n command. That is, if the current subscription is different from the backend, the code planned for the change is not applied because it can't get the state files.

kinseii avatar Aug 09 '24 10:08 kinseii

It looks like an error handling bug at the unit initialization stage. I don't think that the technical reason for the initialization error matters. I will check.

romanprog avatar Aug 19 '24 11:08 romanprog

It looks like an error handling bug at the unit initialization stage. I don't think that the technical reason for the initialization error matters. I will check.

I can send clearer code, as an example, to reproduce the error. In general, the error occurs when I use a Kubernetes or Helm Unit with a single cluster context that is only accessible from its corresponding Azure subscription. If I switch to another subscription, it gives this Unite processing error, which is correct. However, the problem is that the final output says that apply was successful, even though it is not. This misled me until I went through the cdev output in detail.

kinseii avatar Aug 20 '24 04:08 kinseii

I can send clearer code, as an example, to reproduce the error.

No need. I found the error and fixed it. Will be in the next release. Thank you.

romanprog avatar Aug 23 '24 11:08 romanprog

fixed https://github.com/shalb/cluster.dev/releases/tag/v0.9.6

romanprog avatar Sep 11 '24 09:09 romanprog