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

Stream fallback: error handler #12061

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
75c8094
Stop retry flow for error handling (log trigger) (#12026)
amirylm Feb 15, 2024
8ae5f77
add checkErrorHandler (#12037)
shileiwill Feb 15, 2024
30dc562
Stop retry flow for error handling (conditional trigger) (#12032)
amirylm Feb 16, 2024
ed7baf4
refactor streams error handler
infiloop2 Feb 19, 2024
fa054c1
fix mercury v0.2 request handling
infiloop2 Feb 19, 2024
1219a12
fix mercury 0.3 DoRequest
infiloop2 Feb 19, 2024
edd39eb
fix tests
infiloop2 Feb 19, 2024
9524f08
connect check error callback
infiloop2 Feb 19, 2024
02774b8
add todo
infiloop2 Feb 19, 2024
8e7e3fb
add todo
infiloop2 Feb 19, 2024
496e0e9
improve comments
infiloop2 Feb 19, 2024
e97962e
polish 0.2
infiloop2 Feb 19, 2024
566d1c4
fix debug.go, refactor eth_call on checkCallback and checkErrorHandle…
shileiwill Feb 20, 2024
cc46df7
small fixes
infiloop2 Feb 20, 2024
783ed9c
calculate retry config for conditionals
infiloop2 Feb 20, 2024
b660a70
rename to clarify function
infiloop2 Feb 20, 2024
0336020
cleanup pipeline execution errors
infiloop2 Feb 20, 2024
ceec78a
Merge pull request #12088 from smartcontractkit/auto-9006-call-error-…
infiloop2 Feb 20, 2024
d1e15f3
fix unit tests for v02_request.go
shileiwill Feb 21, 2024
6998268
Fix bug in 0.3 request error code
infiloop2 Feb 21, 2024
4969a0a
add state assertion to single feed request tests
infiloop2 Feb 21, 2024
9cdc759
add test case for invalid response bytes
infiloop2 Feb 21, 2024
b67d9e2
add tests for more retryable errors
infiloop2 Feb 21, 2024
1975a0d
add tests for retryable -> error conversion
infiloop2 Feb 21, 2024
d1c9d31
polish 0.2 combining multiple feeds
infiloop2 Feb 21, 2024
d0c6612
add more tests for different combination of feed responses
infiloop2 Feb 21, 2024
40d83f7
remove unused fields
shileiwill Feb 21, 2024
91718a9
unit tests for v03
shileiwill Feb 22, 2024
d4aad99
Merge branch 'auto-9004-stream-err-handler' into unittests
infiloop2 Feb 22, 2024
b4d26aa
fix mercury_test.go
infiloop2 Feb 22, 2024
2e473a5
minor polishing
infiloop2 Feb 22, 2024
a53eaff
Merge pull request #12116 from smartcontractkit/unittests
infiloop2 Feb 22, 2024
dfcb2a4
thread control: added function that accept a context
amirylm Feb 19, 2024
addf869
use threadCtrl.GoCtx to ensure the timeout is applied with the provid…
amirylm Feb 19, 2024
84f67cf
added timeout for mercury requests (including retries)
amirylm Feb 21, 2024
81b8139
fix lint
amirylm Feb 22, 2024
9e8719f
set timeout to 10s
amirylm Feb 22, 2024
81775b3
use GoCtx within request clients
amirylm Feb 22, 2024
1cd2a97
lint
amirylm Feb 22, 2024
fcc1fa2
add more 0.3 tests
infiloop2 Feb 22, 2024
528efd0
set err code to timeout if ctx is done
amirylm Feb 22, 2024
bad4376
Merge pull request #12089 from smartcontractkit/AUTO-9012-investigate…
infiloop2 Feb 22, 2024
4540b21
Finalize stream error codes, polish requests to return consistent nil…
infiloop2 Feb 22, 2024
bb9295a
add tests for checkErrorHanlder
shileiwill Feb 22, 2024
eb3ae85
Merge pull request #12146 from smartcontractkit/AUTO-9078
infiloop2 Feb 23, 2024
fae562a
treat timeout as non retryable error codes
infiloop2 Feb 23, 2024
3100273
allow empty feed request which returns error code
infiloop2 Feb 23, 2024
d8007e4
update test contract with a flag for checkErr result
amirylm Feb 20, 2024
46b9ec5
generate wrappers for LogTriggeredStreamsLookup
shileiwill Feb 20, 2024
777e5aa
handling empty performData case for err handler
amirylm Feb 21, 2024
22b2dcf
test (wip)
amirylm Feb 21, 2024
c8aa142
fixing contract
amirylm Feb 21, 2024
6b04b6c
waiting for err handler logs (wip)
amirylm Feb 21, 2024
f8f7db9
update contract and generate wrappers
shileiwill Feb 21, 2024
9c22402
lint
amirylm Feb 22, 2024
051e0ff
use startBlock instead of 1
amirylm Feb 22, 2024
5b18f3b
add missing arg
amirylm Feb 22, 2024
0bcbe19
check multiple responses:
amirylm Feb 22, 2024
360a14b
fix test
amirylm Feb 25, 2024
9ee1568
cleanup
amirylm Feb 25, 2024
5abd373
Merge pull request #12100 from smartcontractkit/AUTO-9007-error-handl…
infiloop2 Feb 26, 2024
adeaf70
set timeout in http client
infiloop2 Feb 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
treat timeout as non retryable error codes
  • Loading branch information
infiloop2 committed Feb 23, 2024
commit fae562a27ee128cd9882444d52fb350ac879fcd8
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,19 @@ func (c *client) singleFeedRequest(ctx context.Context, ch chan<- mercury.Mercur

retryable = false
if httpResponse, err = c.httpClient.Do(httpRequest); err != nil {
c.lggr.Warnf("at block %s upkeep %s GET request fails for feed %s: %v", sl.Time.String(), sl.UpkeepId.String(), sl.Feeds[index], err)
retryable = true
state = encoding.MercuryFlakyFailure
c.lggr.Errorf("at block %s upkeep %s GET request fails for feed %s: %v", sl.Time.String(), sl.UpkeepId.String(), sl.Feeds[index], err)
errCode = encoding.ErrCodeStreamsUnknownError
if ctx.Err() != nil {
errCode = encoding.ErrCodeStreamsTimeout
}
return err
ch <- mercury.MercuryData{
Index: index,
Bytes: nil,
ErrCode: errCode,
State: encoding.NoPipelineError,
}
sent = true
return nil
}
defer httpResponse.Body.Close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,18 @@ func (c *client) multiFeedsRequest(ctx context.Context, ch chan<- mercury.Mercur
retryable = false
resp, err := c.httpClient.Do(req)
if err != nil {
c.lggr.Warnf("at timestamp %s upkeep %s GET request fails from mercury v0.3: %v", sl.Time.String(), sl.UpkeepId.String(), err)
retryable = true
state = encoding.MercuryFlakyFailure
c.lggr.Errorf("at timestamp %s upkeep %s GET request fails from mercury v0.3: %v", sl.Time.String(), sl.UpkeepId.String(), err)
errCode = encoding.ErrCodeStreamsUnknownError
if ctx.Err() != nil {
errCode = encoding.ErrCodeStreamsTimeout
}
return err
ch <- mercury.MercuryData{
Index: 0,
ErrCode: errCode,
State: encoding.NoPipelineError,
}
sent = true
return nil
}
defer resp.Body.Close()

Expand Down
Loading