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

addresses #1556 by making 'condition' optional for automations #378

Merged
merged 7 commits into from Aug 8, 2019

Conversation

@aaslamin
Copy link
Contributor

commented Aug 6, 2019

Issue: aporeto-inc/aporeto#1556

ℹ️ What this PR does

  • This PR makes the condition attribute optional for automations

Related backend PR


👀 Review: @t00f @primalmotion

aaslamin added some commits Aug 6, 2019

addresses #1556 by making the 'condition' attribute optional if and o…
…nly if the trigger type is set to 'Webhook'
new: add test coverage to verify behaviour for new custom validation …
…logic around the 'condtion' attribute - this attribute is now optional if the automation trigger type is NOT set to 'Webhook'

@aaslamin aaslamin requested review from t00f and primalmotion Aug 6, 2019

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2019

Seems like the spellchecker failed, looking into it 👀

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2019

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0

[
  {
    "project": "optional-condition",
    "component": "gaia",
    "pr-id": "378",
    "commit-sha": "55a2cc04326782c0e2a5a0926fde72804b9f7ec8"
  },
  {
    "project": "optional-condition",
    "component": "backend",
    "pr-id": "495",
    "commit-sha": "e3d9b4e3fc33db31ee6bae9a419797b703a0d6b4"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2019

Alrighty, this should be ready for review now s'il vous plaît 🙏

@aaslamin aaslamin changed the title addresses #1556 by making 'condition' optional for non webhook trigger types addresses #1556 by making 'condition' optional for webhook trigger types Aug 6, 2019

@aaslamin aaslamin changed the title addresses #1556 by making 'condition' optional for webhook trigger types addresses #1556 by making 'condition' optional for automations w/ webhook trigger types Aug 6, 2019

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

FT failures are not related to these changes. The FT's around automations have executed successfully.

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

After speaking with @primalmotion we are going to make the condition completely optional for all types of automations. So the behavioural change will be:

  • If a condition has NOT been defined, then execute the action(s)
  • If a condition has been defined for an automation with a hook trigger type, the condition is simply ignored when processing the automation on the backend.
  • If a condition has been defined, then it's business as usual

On the backend, we will need to add a check in Execute to see if a condition has been defined in order to determine whether we want to parse, execute and verify the condition function's response.

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0

[
  {
    "project": "",
    "component": "gaia",
    "pr-id": "378",
    "commit-sha": "79507d9b761f10e466c4ad10aad918efa5a346cb"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0

[
  {
    "project": "optional-condition",
    "component": "gaia",
    "pr-id": "378",
    "commit-sha": "79507d9b761f10e466c4ad10aad918efa5a346cb"
  },
  {
    "project": "optional-condition",
    "component": "backend",
    "pr-id": "497",
    "commit-sha": "e4168e6714f19c7e8babea0709acee18741ad487"
  }
]

@aaslamin aaslamin force-pushed the address-1556 branch from 479e1cf to a69858b Aug 7, 2019

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0

[
  {
    "project": "optional-condition",
    "component": "gaia",
    "pr-id": "378",
    "commit-sha": "a69858bfdb65bb626f0321d52b3e0db73074e5c8"
  },
  {
    "project": "optional-condition",
    "component": "backend",
    "pr-id": "497",
    "commit-sha": "3820126bfb46c0cb3030344077fe7ae483ea348c"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

This is ready for review 🙏

@aaslamin aaslamin changed the title addresses #1556 by making 'condition' optional for automations w/ webhook trigger types addresses #1556 by making 'condition' optional for automations Aug 8, 2019

@primalmotion primalmotion merged commit fe8c312 into master Aug 8, 2019

4 checks passed

built
Details
functional-tests Submitter: reason: . functional-tests set to success
Details
functional-tests-trigger Submitter: reason: . functional-tests-trigger set to success
Details
unit-tests
Details

@primalmotion primalmotion deleted the address-1556 branch Aug 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.