-
Notifications
You must be signed in to change notification settings - Fork 283
feat(linter): add automated migration for gsutil to gcloud storage #4503
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
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 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -101,6 +101,8 @@ class ErrorCode(Enum): | |||||||||
| # H1 heading required | ||||||||||
| # git, colab and workbench link required | ||||||||||
| # links must be valid links | ||||||||||
| # Storage migration rules | ||||||||||
| ERROR_GSUTIL_DEPRECATED = 103, # Warning for deprecated gsutil usage | ||||||||||
| ERROR_TITLE_HEADING = 1, | ||||||||||
| ERROR_HEADING_CASE = 2, | ||||||||||
| ERROR_HEADING_CAP = 3, | ||||||||||
|
|
@@ -1300,6 +1302,8 @@ def replace_cl(text : str ) -> str: | |||||||||
| 'NAS': '{{vertex_nas_name_short}}', | ||||||||||
| 'Vertex AI Neural Architectural Search': '{{vertex_nas_name}}', | ||||||||||
| 'Neural Architectural Search': '{{vertex_nas_name_short}}', | ||||||||||
| '{{vertex_nas_name}}', | ||||||||||
| 'Neural Architectural Search': '{{vertex_nas_name_short}}', | ||||||||||
| 'Vertex Workbench': '{{vertex_workbench_name}}', | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change introduces a
Suggested change
|
||||||||||
| 'Vertex AI Workbench': '{{vertex_workbench_name}}', | ||||||||||
| #'Vertex SDK': '{{vertex_sdk_name}}', | ||||||||||
|
|
@@ -1309,12 +1313,14 @@ def replace_cl(text : str ) -> str: | |||||||||
| 'Vertex AI': '{{vertex_ai_name}}', | ||||||||||
| 'Ray on Vertex AI': '{{ray_vertex_ai_name}}', | ||||||||||
| 'Google Cloud console': '{{console_name}}', | ||||||||||
|
|
||||||||||
| 'Cloud Storage': '{{storage_name}}', | ||||||||||
| 'GCS': '{{storage_name}}', | ||||||||||
| 'GCP': '{{gcp_name}}', | ||||||||||
| 'TensorFlow Enterprise': '{{tf4gcp_name}}', | ||||||||||
| 'TensorFlow': '{{tensorflow_name}}', | ||||||||||
| 'gsutil ': 'gcloud storage ', | ||||||||||
| '!gsutil ': '!gcloud storage ', | ||||||||||
| '! gsutil ': '! gcloud storage ', | ||||||||||
|
Comment on lines
+1319
to
+1321
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||||||||||
| } | ||||||||||
|
|
||||||||||
| for key, value in substitutions.items(): | ||||||||||
|
|
||||||||||
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 error code
ERROR_GSUTIL_DEPRECATEDis defined but not used anywhere in the script. To properly implement this feature, you should add logic to one of theNotebookRuleclasses to detectgsutilusage and report this error.