gemini-code-assist[bot] commented on code in PR #35744:
URL: https://github.com/apache/beam/pull/35744#discussion_r2243605428


##########
sdks/python/apache_beam/options/pipeline_options.py:
##########
@@ -1169,6 +1169,10 @@ def _handle_temp_and_staging_locations(self, validator):
     elif not staging_errors and not temp_errors:
       self._warn_if_soft_delete_policy_enabled('temp_location')
       self._warn_if_soft_delete_policy_enabled('staging_location')
+      _LOGGER.warning(
+        "Both temp_location and staging_location are invalid. "
+        "Expected format is 'gs://<bucket>/<object>'. "
+        "Attempting to create a default GCS bucket.")

Review Comment:
   ![critical](https://www.gstatic.com/codereviewagent/critical.svg)
   
   This warning is placed in the wrong logical block. The `elif not 
staging_errors and not temp_errors:` condition is true when both 
`staging_location` and `temp_location` are valid, but the warning message 
states that they are invalid. This will result in a confusing and incorrect 
warning being logged for valid configurations. This warning should be moved to 
the `else` block (starting at line 1178), which handles the case where both 
locations are invalid.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to