Storage Container Usage And Grouping¶
Motivation¶
The Storage Account card showed every Azure Blob Storage container equally, including control-plane containers such as dead-letter, job-payloads, and job-artifacts. That made first-run storage look noisier than necessary and did not show how much space each container used.
User-facing change¶
The Storage Account card now keeps researcher-facing containers visible first and places control-plane containers under a collapsed Platform state disclosure. Each container row can show total size and blob count when the backend can enumerate blobs. Large containers are capped by STORAGE_USAGE_MAX_BLOBS_PER_CONTAINER and shown as a lower-bound estimate when the scan is truncated. Usage totals are cached with stale-while-refresh semantics, so cold or expired totals render immediately as calculating usage while the backend refreshes the blob enumeration in the background.
API/IaC diff summary¶
/api/monitor/storagecontainer entries now include nullableblob_count,size_bytes,usage_pending,usage_truncated,usage_error,usage_cache_state, andusage_refreshed_atfields.- Storage usage totals are cached in-process by
api.services.storage_usage_cache; tuning knobs areSTORAGE_USAGE_CACHE_TTL_SECONDS,STORAGE_USAGE_CACHE_STALE_SECONDS, andSTORAGE_USAGE_CACHE_MAX_ENTRIES. - No Bicep changes.
Validation evidence¶
uv run pytest -q api/tests/test_smoke.py -k storage_summaryuv run pytest -q api/tests/test_storage_usage_cache.pycd web && npm run test -- src/components/cards/storage/StorageContainersTable.test.tscd web && npm run build