Skip to content

Commit

Permalink
chore: fixed the naming of entity cache (#455)
Browse files Browse the repository at this point in the history
* chore: fixed the naming of entity cache

* fixed the naming other caches too

* fixing vuln for apache common compress

---------

Co-authored-by: Ronak Kothari <ronakkothari@Ronaks-Laptop.local>
  • Loading branch information
kotharironak and Ronak Kothari authored Feb 20, 2024
1 parent a3263ca commit aca9577
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,22 @@ public EntityCache(EdsClient edsClient, Executor asyncCacheLoaderExecutor) {
asyncCacheLoaderExecutor));

PlatformMetricsRegistry.registerCacheTrackingOccupancy(
"fqnToServiceEntityCache",
this.getClass().getName() + DOT + "fqnToServiceEntityCache",
fqnToServiceEntityCache,
Collections.emptyMap(),
DEFAULT_CACHE_MAX_SIZE);
PlatformMetricsRegistry.registerCacheTrackingOccupancy(
"nameToServiceEntitiesCache",
this.getClass().getName() + DOT + "nameToServiceEntitiesCache",
nameToServiceEntitiesCache,
Collections.emptyMap(),
DEFAULT_CACHE_MAX_SIZE);
PlatformMetricsRegistry.registerCacheTrackingOccupancy(
"nameToNamespaceEntitiesCache",
this.getClass().getName() + DOT + "nameToNamespaceEntitiesCache",
nameToNamespaceEntitiesCache,
Collections.emptyMap(),
DEFAULT_CACHE_MAX_SIZE);
PlatformMetricsRegistry.registerCacheTrackingOccupancy(
"backendIdAttrsToEntityCache",
this.getClass().getName() + DOT + "backendIdAttrsToEntityCache",
backendIdAttrsToEntityCache,
Collections.emptyMap(),
DEFAULT_CACHE_MAX_SIZE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ public SpaceRulesCachingClient(Channel spacesConfigChannel) {
.withCallCredentials(
RequestContextClientCallCredsProviderFactory.getClientCallCredsProvider().get());
PlatformMetricsRegistry.registerCacheTrackingOccupancy(
"spaceRulesCache", spaceRulesCache, Collections.emptyMap(), DEFAULT_CACHE_MAX_SIZE);
this.getClass().getName() + DOT + "spaceRulesCache",
spaceRulesCache,
Collections.emptyMap(),
DEFAULT_CACHE_MAX_SIZE);
}

private final LoadingCache<String, List<SpaceConfigRule>> spaceRulesCache =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public UserAgentParser(Config config) {
.recordStats()
.build(CacheLoader.from(userAgentStringParser::parse));
PlatformMetricsRegistry.registerCacheTrackingOccupancy(
"userAgentCache", userAgentCache, Collections.emptyMap(), cacheMaxSize);
this.getClass().getName() + ".userAgentCache",
userAgentCache,
Collections.emptyMap(),
cacheMaxSize);
}

public Optional<ReadableUserAgent> getUserAgent(Event event) {
Expand Down
9 changes: 9 additions & 0 deletions owasp-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,13 @@
<packageUrl regex="true">^pkg:maven/io\.grpc/grpc\-.*@.*$</packageUrl>
<cve>CVE-2023-44487</cve>
</suppress>
<suppress until="2024-03-30Z">
<notes><![CDATA[
The fix might be available in 1.26.0, we will upgrade to it when its available
file name: commons-compress-1.24.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.apache\.commons/commons\-compress@.*$</packageUrl>
<cve>CVE-2024-25710</cve>
<cve>CVE-2024-26308</cve>
</suppress>
</suppressions>

0 comments on commit aca9577

Please sign in to comment.