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


##########
sdks/python/apache_beam/runners/dataflow/internal/apiclient.py:
##########
@@ -520,7 +520,7 @@ def __init__(self, options, root_staging_location=None):
     transport = None
     if self.google_cloud_options.dataflow_endpoint:
       endpoint = self.google_cloud_options.dataflow_endpoint
-      if 'localhost' in endpoint:
+      if 'localhost' in endpoint or 'sandbox' in endpoint:

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   The substring checks for 'localhost' and 'sandbox' are case-sensitive. If 
the endpoint URL contains uppercase characters (e.g., Localhost or Sandbox), 
this check will fail. Converting the endpoint to lowercase before performing 
the substring check ensures robustness.
   
   ```suggestion
         if 'localhost' in endpoint.lower() or 'sandbox' in endpoint.lower():
   ```



-- 
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