-
Notifications
You must be signed in to change notification settings - Fork 170
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
Conditional policy #812
Conditional policy #812
Conversation
This is just a first very basic version of the conditional engine.
"description": "the policy chain to execute when the condition is true", | ||
"type": "array", | ||
"items": { | ||
"type": "object" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is not exactly what we need.
t/apicast-policy-conditional.t
Outdated
"services": [ | ||
{ | ||
"id": 42, | ||
"backend_version": 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not need those when APIcast (3scale) policy is not active, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right 👍
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it 👍
Only thing I'm worried is the DSL part of the conditional.
I think for some cases we will be fine with structured condition defined in JSON. Over time we probably need a DSL, but for now might be overkill we can't take back.
dae218c
to
e6f2187
Compare
Part of #744
This implements the conditional policy as discussed in #744
The conditional engine is very simple and it's not how the final version will look at all. However, I decided to open this PR in case it helps unblock some of the work going on in ostia.
@mikz let me know if you'd like to have this first version merged soon. Otherwise, I'll start working on a more complex conditional engine (wip branch here: https://github.com/3scale/apicast/tree/lpeg-grammar-condition-engine)