chore: update googleapis and regenerate#17211
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces significant updates across several libraries, including the addition of GlobalVmExtensionPolicies and RolloutPlans to the Compute package, and AssessmentTask support to BigQuery Migration. Feedback identifies a bug in the Compute REST transport where logging.log is called without a required log level and recommends replacing broad, silent exception blocks with specific error logging to improve debuggability and prevent masking issues.
| .. code-block:: python | ||
| class MyCustomGlobalVmExtensionPoliciesInterceptor(GlobalVmExtensionPoliciesRestInterceptor): | ||
| def pre_aggregated_list(self, request, metadata): | ||
| logging.log(f"Received request: {request}") |
There was a problem hiding this comment.
The logging.log function requires a log level as its first argument (e.g., logging.INFO). Using it with only a message string will result in a TypeError. Consider using logging.info or providing a level.
| logging.log(f"Received request: {request}") | |
| logging.info(f"Received request: {request}") |
| method = transcoded_request["method"] | ||
| try: | ||
| request_payload = type(request).to_json(request) | ||
| except: |
There was a problem hiding this comment.
Avoid broad exception blocks that silently return None. Instead, catch Exception and log the error (e.g., using logging.warning) to aid in debugging and prevent masking underlying issues.
except Exception as e:
logging.warning(f"Unexpected error: {e}")References
- Avoid broad
except Exception:blocks that silently returnNone. Instead, log the exception (e.g., usinglogger.warning) to aid in debugging and prevent masking underlying issues.
|
"unit test / unit (3.13)" failed. Searching for "error", I found these log messages: |
|
Interestingly retry succeeded in "unit test / unit (3.13)". |
Update googleapis to the latest commit and regenerate all client libraries.