feat: support JSONPatches for proxy bootstrap modifications#4116
feat: support JSONPatches for proxy bootstrap modifications#4116guydc merged 9 commits intoenvoyproxy:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4116 +/- ##
==========================================
- Coverage 67.95% 67.93% -0.03%
==========================================
Files 187 189 +2
Lines 23017 23099 +82
==========================================
+ Hits 15642 15693 +51
- Misses 6262 6283 +21
- Partials 1113 1123 +10 ☔ View full report in Codecov by Sentry. |
|
/retest |
|
Note that the patch coverage check is artificially low because the PR moved some code from the |
There was a problem hiding this comment.
overall LGTM, if we can just add a few more tests to the new validation flow and IR it would be great.
I think that the decoupling the API package from XDS libs is a positive thing.
cc @zhaohuabing
There was a problem hiding this comment.
Can we cover this validation with a positive/negative test?
There was a problem hiding this comment.
internal/ir/xds.go
Outdated
There was a problem hiding this comment.
can we add a single IR translation test with all invalid cases?
There was a problem hiding this comment.
I've added unit-tests and made the validate method more aligned with RFC 6902
There was a problem hiding this comment.
I also tried to add CEL validation to the JSONPatchOperation structure in the API folder.
Turns out that because the Value field there is apiextensionsv1.JSON, it's not possible to reference the value field in CEL tests. Any CEL expression that tries doesn't compile correctly. So no CEL tests on the JSONPatchOperation are possible if they reference the value attribute.
Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
other unit tests. Signed-off-by: Lior Okman <lior.okman@sap.com>
code. Signed-off-by: Lior Okman <lior.okman@sap.com>
api/v1alpha1/validation package. Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
c790f2e to
541eaf5
Compare
|
/retest |
| ) | ||
|
|
||
| // ProxyBootstrap defines Envoy Bootstrap configuration. | ||
| // +union |
There was a problem hiding this comment.
Not sure. It appears in other places (e.g. RateLimitSpec, ActiveHealthCheckPayload, ActiveHealthCheck, and more), so I added it here and kept the same semantics as in the other places.
Which issue(s) this PR fixes:
Fixes #3691