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

new: add new webhook trigger type to automations #349

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@aaslamin
Copy link
Contributor

commented Jun 19, 2019

Parent issue: aporeto-inc/aporeto#1274

the never ending issue :D

Context

Now with all the recent changes to Bahamut, a NATS pubsub client can choose their desired response mode for their publication and subsequently a subscriber has the ability to respond back accordingly based upon the publishers desired response mode! This is all a fancy way of saying that you can now achieve "request/reply" semantics using the APIs exposed by our Bahamut package. To take advantage of the request/reply pattern, this PR adds a new trigger type to automations known as Webhook (great name, I know!).

When triggered, the behavioural difference will be that the HTTP call will block until the actions have executed . There must be one (and only one) action defined if this trigger type is used because the Javascript object returned by that action will be used to respond back to the HTTP request. Hence the name Webhook. If you haven't guessed, this will basically allow customers to use automations to respond to (Aporeto) webhooks

All the backend plumbing to actually consume this trigger will be coming up in subsequent PRs, but this can be shipped without breaking anything.

Checklist

  • Get feedback from Antoine & Chris
  • Add unit tests

@aaslamin aaslamin requested review from primalmotion and t00f Jun 19, 2019

@aaslamin aaslamin referenced this pull request Jun 19, 2019

Closed

new: add new "webhook mode" attribute to automations #347

1 of 2 tasks complete
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2019

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

[
  {
    "project": "",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "d9b769c3a42ef797e136464f68a648688f1a124a"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2019

Alrighty, this is ready for review s'il vous plaît 🙏

Show resolved Hide resolved specs/automation.spec Outdated

@aaslamin aaslamin force-pushed the webhook-mode-automations branch from d9b769c to 1f0b728 Jun 22, 2019

@aaslamin aaslamin requested a review from primalmotion Jun 22, 2019

@aaslamin aaslamin changed the title new: add new webhook mode attribute to automations new: add new webhook trigger type to automations Jun 22, 2019

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2019

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

[
  {
    "project": "",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "1f0b728d7ca529840e21d69aa4993c17b86d6908"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2019

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

[
  {
    "project": "",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "93b54fbc7387caa7d348fee93fa3d956039b76d5"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2019

- Updated to use a new trigger type Webhook as opposed to a new variable.

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jun 24, 2019

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

[
  {
    "project": "",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "229410ec621c24d01f793fa6f587beb951706773"
  }
]
@primalmotion

This comment has been minimized.

Copy link
Member

commented Jun 25, 2019

do not merge until the implementation is in. also this PR is not part of any project

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 4, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "5186497855a2748db45928c3f43c4765a2ab108a"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "229410ec621c24d01f793fa6f587beb951706773"
  }
]

@aaslamin aaslamin force-pushed the webhook-mode-automations branch from 229410e to 6146859 Jul 4, 2019

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 4, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "f6c97139e0092a870ee87f9090b3d7c4f3b04593"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "61468599339dab366712c252f59c30f13b0791ea"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 4, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "8f7e812508522e8385f1208b53b9ac508602500e"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "61468599339dab366712c252f59c30f13b0791ea"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "ede7c6602909131bbe9abbf8393e1f45598bd5bb"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "61468599339dab366712c252f59c30f13b0791ea"
  }
]
2 similar comments
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "ede7c6602909131bbe9abbf8393e1f45598bd5bb"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "61468599339dab366712c252f59c30f13b0791ea"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "ede7c6602909131bbe9abbf8393e1f45598bd5bb"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "61468599339dab366712c252f59c30f13b0791ea"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "9e2d8934c5528b055f1daf46932b603e77cf2e45"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "89741d8d4c34716c7543e40eb705df68deae99e0"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "c824ebe5966410a386f390c4c366343e75d612fd"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "89741d8d4c34716c7543e40eb705df68deae99e0"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "34425b72693067eea9274e865a818654d08c5839"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "89741d8d4c34716c7543e40eb705df68deae99e0"
  }
]

@aaslamin aaslamin force-pushed the webhook-mode-automations branch 2 times, most recently from 7d7e1fa to 89741d8 Jul 13, 2019

aaslamin added some commits Jun 19, 2019

@aaslamin aaslamin force-pushed the webhook-mode-automations branch from 89741d8 to 49dbcd1 Jul 13, 2019

@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "790ce3b85fe231c9db3354d4209b96f165f912b4"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "49dbcd11d2ab6f54c6c1c23835eb88294c259d89"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "8f179084eca3e98a71f210a787798a52faf43d2a"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "49dbcd11d2ab6f54c6c1c23835eb88294c259d89"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 14, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "9f9af90e6e2644541ba75a7e631be9cbeddacd5c"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "49dbcd11d2ab6f54c6c1c23835eb88294c259d89"
  }
]
@aaslamin

This comment has been minimized.

Copy link
Contributor Author

commented Jul 14, 2019

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

[
  {
    "project": "automation-handle-hooks",
    "component": "backend",
    "pr-id": "450",
    "commit-sha": "cd4f7b2546ad7571f2c4d1baff3a806960ef85fc"
  },
  {
    "project": "automation-handle-hooks",
    "component": "gaia",
    "pr-id": "349",
    "commit-sha": "49dbcd11d2ab6f54c6c1c23835eb88294c259d89"
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.