fix(gcp): use InitializationError instead of panic in gcs-bucket and cloud-function#1061
Closed
Amit2465 wants to merge 1 commit intogruntwork-io:masterfrom
Closed
fix(gcp): use InitializationError instead of panic in gcs-bucket and cloud-function#1061Amit2465 wants to merge 1 commit intogruntwork-io:masterfrom
Amit2465 wants to merge 1 commit intogruntwork-io:masterfrom
Conversation
Contributor
Author
|
Hey @james00012, looks like #1062 handles this at the adapter level by adding a recover() in GcpResourceAdapter.Init(), which is a cleaner approach than fixing each resource individually. Closing this PR since it's covered there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the client initialization error handling in
gcs-bucketandcloud-functionresources. Both were usingpanic()when the GCP client failed to initialize, which would crash the process if the API is disabled. Updated to setr.InitializationErrorand return instead.TODOs
Release Notes (draft)
Updated
gcs-bucketandcloud-functionto gracefully handle client initialization failures instead of panicking.