-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Event Triggers: Take webhook url from env ( close #966) #968
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
Event Triggers: Take webhook url from env ( close #966) #968
Conversation
67b6c68 to
3ba752f
Compare
2) Accept webhook_from_env
3ba752f to
a3aca4c
Compare
|
@dsandip @karthikvt26 Pls add the console changes. |
|
Review app available at: https://hge-ci-pull-968.herokuapp.com |
| tDef <- decodeValue tDefVal | ||
| addEventTriggerToCache (QualifiedTable sn tn) trid trn tDef (RetryConf nr rint) webhook headers | ||
| liftTx $ mkTriggerQ trid trn qt allCols tDef | ||
| addEventTriggerToCache (QualifiedTable sn tn) trid trn opsdef retryConf webhookInfo headers |
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.
qt instead of QualifiedTable sn tn
| getWebhookInfoFromConf wc = case wc of | ||
| WCValue w -> return $ WebhookConfInfo wc w | ||
| WCEnv we -> do | ||
| mEnv <- liftIO $ lookupEnv (T.unpack we) |
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.
wrap the lookupEnv logic in both the places (getHeader and getWebhook) into a function?
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.
Also indentation. Why 6 spaces?
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.
The only thing common in these two functions is lookupEnv function and error case. Not sure if it can be improved.
| parseJSON _ = fail "expecting object for event_trigger_def" | ||
|
|
||
| instance ToJSON EventTriggerConf where | ||
| toJSON (EventTriggerConf name def (WCValue w) rc headers) = object ["name" .= name |
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.
indentation
c287ee9 to
dac3032
Compare
|
Review app available at: https://hge-ci-pull-968.herokuapp.com |
…an/graphql-engine into event-triggers-webhook-env
|
Review app available at: https://hge-ci-pull-968.herokuapp.com |
# Conflicts: # server/src-lib/Hasura/RQL/Types/Subscribe.hs
praveenweb
left a comment
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.
Console changes LGTM
a777dca to
8632194
Compare
8632194 to
dcab8aa
Compare
|
Review app available at: https://hge-ci-pull-968.herokuapp.com |
0640b73 to
5f280a5
Compare
|
Review app available at: https://hge-ci-pull-968.herokuapp.com |
|
Review app available at: https://hge-ci-pull-968.herokuapp.com |
|
@rikinsk Can we add the docs for this, since Tiru is on leave? |
|
Review app https://hge-ci-pull-968.herokuapp.com is deleted |
|
/heroku deploy |
|
Review app available at: https://hge-ci-pull-968.herokuapp.com |
### What We now support cloud-only crates, which are not open-sourced. ### How Anything in `crates/cloud` will not be synced with the _graphql-engine_ repository. In order to facilitate this, we generate and commit a Cargo.toml/Cargo.lock pair with the cloud-only sections removed. We also transform the justfile to remove this code. This includes only a test repository, to ensure that nothing private is synced. When this is merged, it should not result in a commit to the _graphql-engine_ repository. V3_GIT_ORIGIN_REV_ID: 038839acdf3a97da05bbd4b6278171cc12e7cd71
Description
What component does this PR affect?
Requires changes from other components? If yes, please mark the components:
Related Issue
Solution and Design
Type
Checklist: