GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — feat(storagecontrol): add Rapid Cache samples by sahusneha2004 · Pull Request #14724 · GoogleCloudPlatform/python-docs-samples Conversation
|
| Region tag | File |
|---|---|
storage_control_create_rapid_cache |
storagecontrol/create_rapid_cache.py |
storage_control_get_rapid_cache |
storagecontrol/get_rapid_cache.py |
storage_control_list_rapid_caches |
storagecontrol/list_rapid_caches.py |
storage_control_update_rapid_cache |
storagecontrol/update_rapid_cache.py |
storage_control_disable_rapid_cache |
storagecontrol/disable_rapid_cache.py |
Also:
google-cloud-storage-control to 1.17.0, the first released version with the Rapid Cache RPCs.rapid_cache_test.py, a system test that runs create → get → list → update → disable.conftest.py:
rapid_cache_zone: defaults to us-central1-a, can be overridden with RAPID_CACHE_ZONE, and checks the zone format.regional_hns_enabled_bucketrapid_cache_idRefs b/482946642
zone and cache_type="rapid-cache-ultra". It does not set name or ttl; the TTL uses the server default. Rapid Cache Ultra requires a regional bucket with hierarchical namespace enabled. The sample waits for the create operation and prints the name, state and cache type.ttl with update_mask=["ttl"] and prints the new TTL.disabled quickly. The operation only completes once the cache is fully removed, which can take more than an hour. Use get_rapid_cache to check the state.rapid_cache_test.py is skipped unless RUN_RAPID_CACHE_TESTS=True, the same way zonal_snippets_test.py is gated. Rapid Cache Ultra needs an allowlisted project, and test buckets stay behind until the cache removal finishes.State: disabled, and accepts NotFound in case removal already finished.409 ... has Rapid Cache Ultra), it logs a warning and leaves the bucket. The test project needs periodic cleanup of leftover storagecontrol-samples-* buckets.RUN_RAPID_CACHE_TESTS=True, rapid_cache_test.py passed against an allowlisted project (storage-prober-prelaunch-acv2, us-central1-a) in about 17s. It is skipped when the variable is not set.black and flake8 with the GitHub Actions Lint config (.github/scripts/noxfile-lint.py via lint-changed.sh). The older per-directory nox -s lint also reports existing I100/I201 errors in snippets_test.py and managed_folder_list_test.py, which this PR does not touch.enforce_type_hints=True)Generated with the storage-sample-architect workflow.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Adds samples for the Storage Control Rapid Cache CRUD APIs: storage_control_create_rapid_cache, storage_control_get_rapid_cache, storage_control_list_rapid_caches, storage_control_update_rapid_cache, storage_control_disable_rapid_cache. Bumps google-cloud-storage-control to 1.17.0. Refs b/482946642 [Generated-by: AI]
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This pull request introduces support for managing Rapid Caches in Google Cloud Storage Control. It adds scripts to create, disable, get, list, and update Rapid Caches, along with corresponding integration tests and test fixtures in conftest.py. Additionally, the google-cloud-storage-control dependency in requirements.txt is updated to version 1.17.0. There are no review comments to address, and I have no further feedback to provide.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Set the explicit cache name (ID = zone), cache_type rapid-cache-ultra and ttl 24h on create; wait for the disable LRO; tests assert running state, cache type, list membership and the updated ttl, and bound the disable wait. Aligns with googleapis/google-cloud-java#14529. b/482946642 [Generated-by: AI]
Reorder imports in storagecontrol/conftest.py and storagecontrol/rapid_cache_test.py to match the repository-root flake8-import-order configuration used by the GitHub Actions Lint workflow. [Generated-by: AI]
- create_rapid_cache: set only the required fields (name, zone, cache_type) and leave TTL to the update sample; use a cache_id variable consistent with get/update. - tests: move cleanup into a rapid_cache_id fixture that disables the cache on teardown if it is still active, so cleanup runs even when assertions fail; keep the test flow linear without nested try/except/finally; bound the disable wait with the native operation timeout. - disable_rapid_cache: document that the operation completes only after the cache is fully removed. [Generated-by: AI]
There was an error while loading. Please reload this page.
|
Here is the summary of changes. You are about to add 5 region tags.
This comment is generated by snippet-bot.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CI triage: Kokoro failures are not caused by this PR All eight failing (The Python 3.x jobs show the same error for
No code changes are needed for these checks. A maintainer can merge once reviews are done, or retire the leftover Kokoro status contexts in the repo's required-checks settings. [Generated-by: AI] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the Rapid Cache samples. Overall structure and region tags look good.
I have a few comments below, mainly around:
disable_rapid_cache.py.rapid_cache_test.py for non-allowlisted projects.create_rapid_cache.py and test fixture teardown/waits in conftest.py.Also, please update the PR description to reflect only the final code. Several notes currently contradict HEAD (such as ttl on create, fixture count, and lint behavior).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
- disable_rapid_cache: start the LRO without waiting; print the cache path and operation name and point users to get_rapid_cache. - create_rapid_cache: drop the unused RapidCache.name; note that Rapid Cache Ultra requires a regional HNS bucket. - get_rapid_cache: print the TTL when set. - Soften cache ID comments; the ID is not guaranteed to equal the zone. - rapid_cache_test: opt-in via RUN_RAPID_CACHE_TESTS=True; assert the disable output and tolerate NotFound when checking the disabled state. - conftest: validate RAPID_CACHE_ZONE, remove the 20s sleep, use a single best-effort bucket delete, and disable caches by name on teardown. [Generated-by: AI]
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.