Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shim_util issue in translating "CLOUDSDK_API_ENDPOINT_OVERRIDES_STORAGE" parameter from .boto config #1801

Open
brahma19 opened this issue Oct 3, 2024 · 0 comments

Comments

@brahma19
Copy link

brahma19 commented Oct 3, 2024

.boto has entry for
[Credentials]
gs_json_host = foo.bar
[GSUtil]
use_gcloud_storage=True

running the gsutil command fails with below error:
ERROR: (gcloud.storage.ls) Invalid value for property [api_endpoint_overrides/storage]: The endpoint_overrides property must be an absolute URI beginning with http:// or https:// and ending with a trailing '/'.

PFB the debug log
DEBUG: (gcloud.storage.ls) Invalid value for property [api_endpoint_overrides/storage]: The endpoint_overrides property must be an absolute URI beginning with http:// or https:// and ending with a trailing '/'. [https://foo.bar/storage/v1] is not a valid endpoint override. Traceback (most recent call last): File "/apps/opt/application/google-cloud-sdk/lib/googlecloudsdk/core/properties.py", line 4147, in Validate self.__validator(value) File "/apps/opt/application/google-cloud-sdk/lib/googlecloudsdk/core/properties.py", line 1425, in EndpointValidator raise InvalidValueError( googlecloudsdk.core.properties.InvalidValueError: The endpoint_overrides property must be an absolute URI beginning with http:// or https:// and ending with a trailing '/'. [https://foo.bar//storage/v1] is not a valid endpoint override.

To Fix:
Need to add trailing "/" in the shim_util when returning the translated value
https://github.com/GoogleCloudPlatform/gsutil/blob/master/gslib/utils/shim_util.py#L278

brahma19 added a commit to brahma19/gsutil that referenced this issue Oct 3, 2024
gsutil ls command fails as the endpoint is missing the trailing "/".
brahma19 added a commit to brahma19/gsutil that referenced this issue Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant