Use metadata-free GCS bucket references#695
Draft
kmontemayor2-sc wants to merge 1 commit into
Draft
Conversation
Replace object-only Client.get_bucket() calls with Client.bucket() so GcsUtils does not require storage.buckets.get for blob existence, listing, and deletion helpers. Client.bucket() is a metadata-free drop-in for these paths because they only construct blob references, list object prefixes, or delete objects; none reads bucket metadata.
Collaborator
Author
|
/all_test |
Contributor
GiGL Automation@ 01:27:39UTC : 🔄 @ 02:42:51UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 01:27:39UTC : 🔄 @ 01:29:25UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 01:27:39UTC : 🔄 @ 03:05:19UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 01:27:42UTC : 🔄 @ 01:36:26UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 01:27:42UTC : 🔄 @ 02:56:38UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 01:27:43UTC : 🔄 @ 01:35:56UTC : ✅ Workflow completed successfully. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace object-only
storage.Client.get_bucket(...)calls inGcsUtilswithstorage.Client.bucket(...).These paths only construct blob references, list object prefixes, or delete objects. They do not read bucket metadata, so
Client.bucket()isbehavior-preserving and avoids requiring
storage.buckets.getfor callers that only have object-scoped IAM roles such asroles/ storage.objectUser.Changes
does_gcs_file_exist,delete_gcs_file_if_exist,count_blobs_in_gcs_path,delete_files, and_delete_files_in_bucket_dirtouse metadata-free bucket references.
get_bucket()is used for these object-only helpers.Tests
make unit_test_py PY_TEST_FILES="gcs_test.py": passedmake integration_test PY_TEST_FILES="gcs_test.py": passedmake type_check: passeduv run ruff check --config pyproject.toml gigl/common/utils/gcs.py tests/unit/utils/gcs_test.py tests/integration/common/gcs_test.py:passed
uv run ruff format --check --config pyproject.toml gigl/common/utils/gcs.py tests/unit/utils/gcs_test.py tests/integration/common/ gcs_test.py: passedNote: full
make check_formatpassed Python/C++/Scala phases but failed on unrelated pre-existing Markdown formatting issues outside thischange.