krkn-chaos / krkn

Chaos and resiliency testing tool for Kubernetes with a focus on improving performance under failure conditions. A CNCF sandbox project.
Apache License 2.0
291 stars 102 forks source link

Do not fail GCP auth when GOOGLE_APPLICATION_CREDENTIALS is not found #707

Closed pablomh closed 1 month ago

pablomh commented 1 month ago

Auth could have been set up using the Google Cloud CLI:

paigerube14 commented 1 month ago

Got this error when not setting the google application credentials.

Also would be good to add this to the docs as an alternative way to configure the cloud for this scenario

2024-10-07 13:54:51,605 [INFO] Starting node_stop_start_scenario injection
2024-10-07 13:54:51,605 [INFO] stop scenario
2024-10-07 13:54:51,605 [INFO] Starting node_stop_scenario injection
2024-10-07 13:54:51,606 [ERROR] Failed to stop node instance. Encountered following exception: 'GCP' object has no attribute 'project'. Test Failed
chaitanyaenr commented 1 month ago

Got this error when not setting the google application credentials.

cc: @pablomh

pablomh commented 1 month ago

I've changed the status to DRAFT while I figure out how to avoid @paigerube14 problem. The reason I didn't spot it is because I've been testing this code using the google.auth Python API which sets project using:

credentials, project = google.auth.default()
pablomh commented 1 month ago

Will close in favor of https://github.com/krkn-chaos/krkn/pull/723.