kyma-project / cloud-manager

Apache License 2.0
3 stars 14 forks source link

fix(scope): hardening gcp enableApis and check operation status #679

Closed abalaie closed 1 week ago

abalaie commented 2 weeks ago

Description

Changes proposed in this pull request:

Related issue(s)

Fixes #678

dushanpantic commented 1 week ago

Do we even need operations? It seems they are just causing mental overhead.

The code is already written in a way where it checks if API is enabled, and if not, it enables it. Perhaps enableApisGcp action should continue when nothing got enabled in it, and requeue if anything got enabled in it.

What do you think?

abalaie commented 1 week ago

Do we even need operations? It seems they are just causing mental overhead.

The code is already written in a way where it checks if API is enabled, and if not, it enables it. Perhaps enableApisGcp action should continue when nothing got enabled in it, and requeue if anything got enabled in it.

What do you think?

We had a similar discussion about checking gcp operations in other reconcilers as well. The most important benefit of checking the operation is that, we can log why they fail. Without that, if we can't enable apis on a particular gcp project, we will never know the reason. But with checking the operation we can log the reason of its failure. Thanks to your comment, I reviewed the code and noticed that we were not logging the error message of operation failure. So I added it. Thank you.