Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fressi-elastic
Copy link
Contributor

@fressi-elastic fressi-elastic commented Nov 14, 2025

This adds the new GSAdapter class to download files from Google Cloud buckets using authentication.

It allows to download bucket blobs via URLs like the following:

  • gs://{bucket_name}/{blob_name}
  • https://storage.cloud.google.com/{bucket_name}/{blob_name}

For downloading files publicly available from a Google Cloud bucket, the following type of URLs is supported by the already existing HTTPAdapter:

  • https://storage.googleapis.com/{bucket_name}/{blob_name}

@fressi-elastic fressi-elastic marked this pull request as ready for review November 17, 2025 11:01
@fressi-elastic fressi-elastic requested a review from a team November 17, 2025 11:30
@fressi-elastic
Copy link
Contributor Author

@gbanasiak This is ready for review.

@fressi-elastic fressi-elastic enabled auto-merge (squash) November 19, 2025 09:28
Copy link
Contributor

@gbanasiak gbanasiak left a comment

Choose a reason for hiding this comment

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

Looks good, I left small comments below.

Local testing with small files were OK, but tests with larger downloads show data corruption during decompression. pzstd reports Unknown frame descriptor while standard library reports zstd.ZstdError: zstd decompress error: Data corruption detected. This is easily reproducible. Legacy download works fine.

Copy link
Contributor

@gbanasiak gbanasiak left a comment

Choose a reason for hiding this comment

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

This works fine in testing now, I've checked both Linux and MacOS.

Can you add relevant tests to test_adapter_registry_get() in adapter_test.py?

Unrelated: when testing directly with esrally-storage I need to pass the bucket URL as base with --base-url, example:

esrally-storage --base-url=gs://<bucket> -v get gs://<bucket>/<something>/<file>

Is this avoidable?

@gbanasiak gbanasiak removed the request for review from NickDris November 24, 2025 13:11
@fressi-elastic
Copy link
Contributor Author

Can you add relevant tests to test_adapter_registry_get() in adapter_test.py?

I'll do.

Unrelated: when testing directly with esrally-storage I need to pass the bucket URL as base with --base-url, example:

There are some issues (including this) that I saw in the CLI that should have been fixed in the incoming CL (please have a look at PR #1959 for it).

esrally-storage --base-url=gs://<bucket> -v get gs://<bucket>/<something>/<file>

Is this avoidable?

Copy link
Contributor

@gbanasiak gbanasiak left a comment

Choose a reason for hiding this comment

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

LGTM

@fressi-elastic fressi-elastic merged commit 3d6864d into elastic:master Nov 25, 2025
15 checks passed
@fressi-elastic fressi-elastic deleted the storage.gc branch November 26, 2025 10:03
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

Successfully merging this pull request may close these issues.

2 participants