Skip to content

fix: reuse http client for externaldata requests#424

Draft
mannbiher wants to merge 1 commit intoopen-policy-agent:masterfrom
mannbiher:reuse-http-client
Draft

fix: reuse http client for externaldata requests#424
mannbiher wants to merge 1 commit intoopen-policy-agent:masterfrom
mannbiher:reuse-http-client

Conversation

@mannbiher
Copy link
Copy Markdown

Instead of creating a new http.Client for each external data request, create it per provider and reuse it.

Fixes #423

Signed-off-by: Maneesh Singh <mann.biher@yahoo.co.in>
@mannbiher mannbiher marked this pull request as draft April 26, 2024 13:36
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 74.41860% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 53.09%. Comparing base (76869f8) to head (a369b9d).
Report is 13 commits behind head on master.

Files Patch % Lines
constraint/pkg/client/drivers/rego/builtin.go 76.19% 7 Missing and 3 partials ⚠️
constraint/pkg/externaldata/request.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
- Coverage   54.68%   53.09%   -1.59%     
==========================================
  Files          71      104      +33     
  Lines        5241     6537    +1296     
==========================================
+ Hits         2866     3471     +605     
- Misses       2073     2704     +631     
- Partials      302      362      +60     
Flag Coverage Δ
unittests 53.09% <74.41%> (-1.59%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JaydipGabani
Copy link
Copy Markdown
Contributor

@mannbiher is this ready for review? are you still working on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OPA gatekeeper audit externaldata error: dial tcp: connect: cannot assign requested address

3 participants