Ambassador - Enhance CacheSize Service to read from all available caches
Type of change
-
Bug Fix -
Feature
Please provide link to gitlab issue or ADR(Architecture Decision Record)
#381 (closed)
Does this introduce a change in the core logic?
- [YES/NO]
Does this introduce a change in the cloud provider implementation, if so which cloud?
-
AWS -
Azure -
GCP -
IBM
Does this introduce a breaking change?
- [YES/NO]
What is the current behavior?
Ambassador's /cacheSize endpoint requires a kind
parameter and only returns the first matching cache's size.
What is the new/expected behavior?
Ambassador's /cacheSize endpoint optionally takes a kind
parameter. Otherwise, it returns the cache size of all available caches in a report organized by kind
:
{
"cacheSize": {
"osdu:wks:work-product-component--GenericRepresentation:1.2.0": [
{
"cacheName": "GenericRepresentation1",
"size": 37
},
{
"cacheName": "GenericRepresentation2",
"size": 37
}
]
}
}
Modified the /updateCache
endpoint so that if multiple caches are detected as corresponding to the kind
param, then all associated caches will be updated.
Added a few updates to our docs to showcase the Ambassador endpoints better: https://community.opengroup.org/osdu/platform/consumption/geospatial/-/blob/523b4b6a5420f632a320597c4da8470b18b7ad53/docs/deployment/post_deployment_testing.md#inspect-the-gcz-using-ambassador-endpoints
Have you added/updated Unit Tests and Integration Tests?
NA
Any other useful information
- minor updates for log clarity
- smoother failure for missing storage record when ingesting with a
geometryLocation
ofstorage