Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
if 'localhost' in endpoint or 'sandbox' in endpoint:
if 'localhost' in endpoint.lower() or 'sandbox' in endpoint.lower():

transport = 'rest'
else:
endpoint = re.sub('^https?://', '', endpoint)
Expand Down
Loading