-
Notifications
You must be signed in to change notification settings - Fork 228
Migrate gsutil usage to gcloud storage #4329
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
Changes from 1 commit
d38ac1c
d8571f8
8ca9b56
a1ed9c6
a7ab350
25c3780
682761f
41dad18
f2decbe
a42f0a0
46e3549
1496941
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -185,11 +185,10 @@ | |||||
| "if BUCKET_URI is None or BUCKET_URI.strip() == \"\" or BUCKET_URI == \"gs://\":\n", | ||||||
| " BUCKET_URI = f\"gs://{PROJECT_ID}-tmp-{now}-{str(uuid.uuid4())[:4]}\"\n", | ||||||
| " BUCKET_NAME = \"/\".join(BUCKET_URI.split(\"/\")[:3])\n", | ||||||
| " ! gsutil mb -l {REGION} {BUCKET_URI}\n", | ||||||
| "else:\n", | ||||||
| " ! gcloud storage buckets create --location={REGION} {BUCKET_URI}\n", "else:\n", | ||||||
| " assert BUCKET_URI.startswith(\"gs://\"), \"BUCKET_URI must start with `gs://`.\"\n", | ||||||
| " shell_output = ! gsutil ls -Lb {BUCKET_NAME} | grep \"Location constraint:\" | sed \"s/Location constraint://\"\n", | ||||||
| " bucket_region = shell_output[0].strip().lower()\n", | ||||||
| # Note: The format of the full listing output is different. gcloud storage uses a title case for keys and will not display a field if its value is "None". | ||||||
|
||||||
| # Note: The format of the full listing output is different. gcloud storage uses a title case for keys and will not display a field if its value is "None". | |
| "# Note: The format of the full listing output is different. gcloud storage uses a title case for keys and will not display a field if its value is \"None\".\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The automated migration introduced a syntax error in this notebook cell. The comments on lines 534-536 and the command on line 537 are not enclosed in quotes, which makes the JSON for this cell's
sourcearray invalid. This will cause the notebook to fail to load or execute. All lines within thesourcearray must be valid strings.