From 830605adba178301d2e01421d382b608c8c864b7 Mon Sep 17 00:00:00 2001 From: pwnhaven-afk Date: Fri, 20 Nov 2026 20:09:23 +0400 Subject: [PATCH 1/3] fix(storagecontrol): guard CLI args in get_rapid_cache sample --- storagecontrol/get_rapid_cache.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storagecontrol/get_rapid_cache.py b/storagecontrol/get_rapid_cache.py index 1d5288a603..a4b7f9e187 100644 --- a/storagecontrol/get_rapid_cache.py +++ b/storagecontrol/get_rapid_cache.py @@ -47,4 +47,7 @@ def get_rapid_cache(bucket_name: str, cache_id: str) -> None: if __name__ == "__main__": + if len(sys.argv) != 3: + print(f"Usage: python {sys.argv[0]} ") + sys.exit(1) get_rapid_cache(bucket_name=sys.argv[1], cache_id=sys.argv[2]) From 5d59d6e943504c8584d219c3b4b2a2be82a2e9ae Mon Sep 17 00:00:00 2001 From: pwnhaven-afk Date: Fri, 20 Nov 2026 20:10:41 +0400 Subject: [PATCH 2/3] test(storagecontrol): note what the rapid cache test covers --- storagecontrol/rapid_cache_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/storagecontrol/rapid_cache_test.py b/storagecontrol/rapid_cache_test.py index de49ddc93b..47bb48d35e 100644 --- a/storagecontrol/rapid_cache_test.py +++ b/storagecontrol/rapid_cache_test.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Exercises the Rapid Cache samples end to end. import os import create_rapid_cache From f64bbe06fb72c8e6dcff9033e282671b7812ee48 Mon Sep 17 00:00:00 2001 From: pwnhaven-afk Date: Fri, 20 Nov 2026 20:11:34 +0400 Subject: [PATCH 3/3] docs(storagecontrol): clarify the rapid cache sample family --- storagecontrol/create_rapid_cache.py | 1 + storagecontrol/disable_rapid_cache.py | 1 + storagecontrol/list_rapid_caches.py | 1 + storagecontrol/update_rapid_cache.py | 1 + 4 files changed, 4 insertions(+) diff --git a/storagecontrol/create_rapid_cache.py b/storagecontrol/create_rapid_cache.py index 6592810719..150fbc85e8 100644 --- a/storagecontrol/create_rapid_cache.py +++ b/storagecontrol/create_rapid_cache.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Rapid Cache sample (see the storage control documentation). import sys # [START storage_control_create_rapid_cache] diff --git a/storagecontrol/disable_rapid_cache.py b/storagecontrol/disable_rapid_cache.py index f55f5cba6a..53364ff7e3 100644 --- a/storagecontrol/disable_rapid_cache.py +++ b/storagecontrol/disable_rapid_cache.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Rapid Cache sample (see the storage control documentation). import sys # [START storage_control_disable_rapid_cache] diff --git a/storagecontrol/list_rapid_caches.py b/storagecontrol/list_rapid_caches.py index 4ed9eb9a15..d7af4a964c 100644 --- a/storagecontrol/list_rapid_caches.py +++ b/storagecontrol/list_rapid_caches.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Rapid Cache sample (see the storage control documentation). import sys # [START storage_control_list_rapid_caches] diff --git a/storagecontrol/update_rapid_cache.py b/storagecontrol/update_rapid_cache.py index e1e9b75b2c..7dd4084057 100644 --- a/storagecontrol/update_rapid_cache.py +++ b/storagecontrol/update_rapid_cache.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Rapid Cache sample (see the storage control documentation). import sys # [START storage_control_update_rapid_cache]