GoogleCloudPlatform / GoogleCloudPlatform/generative-ai

[Feat]: refactor(embeddings): migrate legacy gsutil commands to gcloud storage

Open
#3,071 0 comments 0 reactions 1 assignee Claimed by @polong-lin View on GitHub
Dominant language
Jupyter Notebook
Stars
17.7k
Forks
4.5k
Avg merge
12h 38m
Merged PRs (30d)
42

Description

### Is your feature request related to a problem? Please describe.

Legacy gsutil commands are deprecated across Google Cloud SDK tools in favor of gcloud storage. Modernizing these commands prevents bit-rot and ensures alignment with current Google Cloud CLI best practices.

### Describe the solution you'd like

Update `embeddings/intro-textemb-vectorsearch.ipynb` to use modern `gcloud storage` commands:
1. Replace `gsutil mb` and `gsutil cp` with `gcloud storage buckets create` and `gcloud storage cp`.
2. Replace `gsutil rm -r` with `gcloud storage rm --recursive`.
3. Standardize subshell variable expansion using `{LOCATION}` and `{PROJECT_ID}` syntax.

Since direct Pull Request creation is restricted to collaborators on this repository, I have prepared, formatted, and tested this refactor on my fork. Maintainers can review the commit here:
https://github.com/Red1-Rahman/generative-ai/commit/2a0279185a54b51bd1608390e737762d9091f785

### Describe alternatives you've considered

Leaving `gsutil` in place, but `gsutil` is deprecated and slated for future removal from Google Cloud SDK distributions.

### Additional context

I have signed the CLA under GitHub handle Red1-Rahman

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.