-
Notifications
You must be signed in to change notification settings - Fork 350
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
Condition engine refactor and improvements — JSON Schema Validation #882
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XVincentX
force-pushed
the
feat/condition-refactor
branch
from
March 16, 2019 14:19
9156caf
to
67b2633
Compare
XVincentX
force-pushed
the
feat/condition-refactor
branch
from
March 16, 2019 14:46
6c67292
to
5be5221
Compare
Codecov Report
@@ Coverage Diff @@
## master #882 +/- ##
==========================================
+ Coverage 89.15% 89.16% +0.01%
==========================================
Files 135 136 +1
Lines 3652 3674 +22
==========================================
+ Hits 3256 3276 +20
- Misses 396 398 +2
Continue to review full report at Codecov.
|
XVincentX
force-pushed
the
feat/condition-refactor
branch
from
March 16, 2019 15:24
04bc022
to
d61ea23
Compare
XVincentX
force-pushed
the
feat/condition-refactor
branch
3 times, most recently
from
March 16, 2019 15:50
7743147
to
d671d7b
Compare
XVincentX
force-pushed
the
feat/condition-refactor
branch
from
March 16, 2019 15:54
d671d7b
to
b3323bb
Compare
XVincentX
force-pushed
the
feat/condition-refactor
branch
from
March 16, 2019 16:12
d943c59
to
62d9c4a
Compare
XVincentX
force-pushed
the
feat/condition-refactor
branch
from
March 16, 2019 16:19
62d9c4a
to
1720823
Compare
XVincentX
force-pushed
the
feat/condition-refactor
branch
from
March 17, 2019 09:29
74a2334
to
cb37447
Compare
XVincentX
force-pushed
the
feat/condition-refactor
branch
from
March 17, 2019 09:59
801e9ec
to
69b39db
Compare
XVincentX
changed the title
Condition engine refactor and improvements
Condition engine refactor and improvements — JSON Schema Validation
Mar 17, 2019
gatherchou
pushed a commit
to yilu-tech/express-gateway
that referenced
this pull request
Jul 29, 2021
…xpressGateway#882) * unify code style with conditions * show condition name correctly * refactor pipeline construction * put default condition in the schema * provide more data and logger * restore conditionConfig check * fix typo * validate conditions ahead of the time * temporany compatibility * check condition presence * fix test text * add condition indirection layer * provide validation for sub conditions * json schema validator * add flatmap for node 8 and 10 * use logError to show stuff or not * Compatibility with old plugins * move it in conditions * kill matchEgCondition * add test for json schema
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a refactor of the condition engine solving couple of limitations that were starting be an issue.
As a result of the changes, we're now able to validate the condition's JSON Schema before starting the gateway (catching problems ahead of the time instead of catching them during the runtime).
Summary:
matchEgCondition
function. This helps making conditions and policy kind of the same thing; it should be easier to maintain.I've also implemented the JSON Schema Validate condition which can be used around, helping moving the OpenAPI integration forward. Right now it works by using kind of a secret property called
middlewares
so that they can be installed before evaluating the current policy. Kind of hacky, but it does the job.Connect #591
Closes #591