mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
perf: Use circuit breaker to fail open Malysis query requests (#196)
* perf: Use circuit breaker to fail open Malysis query requests * fix: Linter fixes * test: Add test to confirm grpc status error unwrapping
This commit is contained in:
@@ -52,6 +52,7 @@ func NewNpmRegistryInterceptor(
|
||||
cache: cache,
|
||||
statsCollector: statsCollector,
|
||||
confirmationChan: confirmationChan,
|
||||
circuitBreaker: newAnalyzerCircuitBreaker("malysis-analyzer-npm"),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -110,7 +111,7 @@ func (i *NpmRegistryInterceptor) HandleRequest(ctx *proxy.RequestContext) (*prox
|
||||
return &proxy.InterceptorResponse{Action: proxy.ActionAllow}, nil
|
||||
}
|
||||
|
||||
result, err := i.baseRegistryInterceptor.analyzePackage(
|
||||
result, err := i.analyzePackage(
|
||||
ctx,
|
||||
packagev1.Ecosystem_ECOSYSTEM_NPM,
|
||||
pkgInfo.GetName(),
|
||||
|
||||
Reference in New Issue
Block a user