-
Notifications
You must be signed in to change notification settings - Fork 2.8k
respect retry-after header on event trigger response #525
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
Conversation
server/src-lib/Hasura/Events/Lib.hs
Outdated
| } | ||
| $(deriveToJSON (aesonDrop 4 snakeCase){omitNothingFields=True} ''InvocationRequest) | ||
|
|
||
| data InvocationResponse |
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.
Invocation -> Webhook
server/src-lib/Hasura/Events/Lib.hs
Outdated
| getRetryAfterHeaderFromError (HStatus resp) = getRetryAfterHeaderFromResp resp | ||
| getRetryAfterHeaderFromError _ = Nothing | ||
|
|
||
| getRetryAfterHeaderFromResp resp = let mHeader = find (\(HeaderConf name _) -> CI.mk name == retryAfterHeader) (hrsHeaders resp) |
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
server/src-lib/Hasura/Events/Lib.hs
Outdated
| in (name, value) | ||
|
|
||
| decodeHeader :: [EventHeaderInfo] -> (N.HeaderName, BS.ByteString) -> HeaderConf | ||
| decodeHeader headerInfos (hdrName, hdrVal) = let name = decodeBS $ CI.original hdrName |
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
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
| data HeaderValue = HVValue T.Text | HVEnv T.Text | ||
| deriving (Show, Eq, Lift) | ||
|
|
||
| instance ToJSON HeaderValue where |
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.
This instance should not exist
3daa7ca to
5a72b25
Compare
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
1 similar comment
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
|
@tirumaraiselvan can you add an appropriate PR title and description please? |
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
|
@karthikvt26 Requires console changes to handle new schema of event invocation logs. |
# Conflicts: # server/src-lib/Hasura/RQL/DDL/Schema/Table.hs
…gine into retry_after_2
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
|
Review app available at: https://hge-ci-pull-525.herokuapp.com |
|
Review app https://hge-ci-pull-525.herokuapp.com is deleted |
The massive `Error` enum from `execute.rs` disintegrates into the following independent error types. - `RequestError`: All exceptions occurred before executing the root field plans. Each variant in this error enum contains the error type stemming from isolated steps in the pipeline involving parsing, validation, IR conversion, and plan generation. - `FieldError`: Exception occurred when resolving a field through its plan. Multiple root fields are executed isolated, and field errors are collected in a list. Code paths for `explain` and `execute` query are split into two functions. This is done to avoid few error variants and unburden the function that previously does both. V3_GIT_ORIGIN_REV_ID: 21f2f43ee4805a955fa0ce7d9b45c4b1902def63
Description
Webhooks will be retried if responses contain a "Retry-After" header. This will augment the existing RetryConf settings by retrying even if 1) num_retries have been exhausted , 2) Retry-After is smaller than interval_sec
What component does this PR affect?
Requires changes from other components? If yes, please mark the components:
Related Issue
Solution and Design
Tests
Type
Checklist: