Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add external data provider #134

Merged
merged 19 commits into from
Oct 4, 2021

Conversation

sozercan
Copy link
Member

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2021

Codecov Report

Merging #134 (c3ff133) into master (f653a9c) will decrease coverage by 0.77%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
- Coverage   42.28%   41.51%   -0.78%     
==========================================
  Files          46       52       +6     
  Lines        2980     3122     +142     
==========================================
+ Hits         1260     1296      +36     
- Misses       1329     1435     +106     
  Partials      391      391              
Flag Coverage Δ
unittests 41.51% <ø> (-0.78%) ⬇️

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

Impacted Files Coverage Δ
...works/constraint/pkg/client/drivers/local/local.go 48.07% <0.00%> (-8.39%) ⬇️
...pis/externaldata/v1alpha1/zz_generated.deepcopy.go 0.00% <0.00%> (ø)
...t/pkg/apis/externaldata/v1alpha1/provider_types.go 100.00% <0.00%> (ø)
...nt/frameworks/constraint/pkg/externaldata/cache.go 100.00% <0.00%> (ø)
.../frameworks/constraint/pkg/externaldata/request.go 0.00% <0.00%> (ø)
...straint/pkg/apis/externaldata/v1alpha1/register.go 0.00% <0.00%> (ø)
...frameworks/constraint/pkg/externaldata/response.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f653a9c...c3ff133. Read the comment docs.

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Mostly clear cut comments. The thorniest comments are around the Rego function signature and whether we should have a more well-defined wire format.

constraint/config/kustomization.yaml Outdated Show resolved Hide resolved
constraint/pkg/client/client.go Outdated Show resolved Hide resolved
constraint/pkg/client/drivers/local/local.go Outdated Show resolved Hide resolved
constraint/pkg/client/drivers/local/local.go Outdated Show resolved Hide resolved
constraint/pkg/externaldata/cache.go Outdated Show resolved Hide resolved
constraint/pkg/externaldata/cache.go Outdated Show resolved Hide resolved
constraint/pkg/externaldata/cache.go Show resolved Hide resolved
constraint/pkg/externaldata/cache.go Outdated Show resolved Hide resolved
constraint/pkg/externaldata/cache.go Show resolved Hide resolved
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few questions, nothing major I don't think.

spec:
description: ProviderSpec defines the desired state of Provider
properties:
maxRetry:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should put max retries as part of the invocation of the provider? I could see validation more retry-tolerant than mutation, for example.

Copy link
Member Author

@sozercan sozercan Sep 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean as part of external_data() (only for validation so remove maxretry from provider)? do we want to set up a default value if user doesn't provide this (1?)?

constraint/pkg/apis/templates/yaml_constant.go Outdated Show resolved Hide resolved
constraint/pkg/client/drivers/local/local.go Show resolved Hide resolved
constraint/pkg/client/drivers/local/local.go Outdated Show resolved Hide resolved
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
@sozercan
Copy link
Member Author

@maxsmythe any unresolved comments?

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple small things, but ready to merge after that.

constraint/pkg/apis/templates/yaml_constant.go Outdated Show resolved Hide resolved
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
@sozercan sozercan requested a review from ritazh October 1, 2021 23:32
@sozercan sozercan merged commit bdb068f into open-policy-agent:master Oct 4, 2021
@sozercan sozercan deleted the feat-externaldata2 branch October 4, 2021 17:47
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.

None yet

5 participants