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

Conditional policy #812

Merged
merged 6 commits into from
Jul 18, 2018
Merged

Conditional policy #812

merged 6 commits into from
Jul 18, 2018

Conversation

davidor
Copy link
Contributor

@davidor davidor commented Jul 12, 2018

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)

@davidor davidor requested a review from a team as a code owner July 12, 2018 16:02
"description": "the policy chain to execute when the condition is true",
"type": "array",
"items": {
"type": "object"
Copy link
Contributor Author

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.

"services": [
{
"id": 42,
"backend_version": 1,
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right 👍
Fixed.

Copy link
Contributor

@mikz mikz left a 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.

@davidor davidor force-pushed the conditional-policy branch from dae218c to e6f2187 Compare July 17, 2018 08:47
@davidor davidor changed the title [WIP] Conditional policy Conditional policy Jul 17, 2018
@davidor davidor merged commit 9d79365 into master Jul 18, 2018
@davidor davidor deleted the conditional-policy branch July 18, 2018 15:05
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.

2 participants