-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[BCF-3178] - Improve err handling and logs for in memory data source cache #12907
Conversation
I see you updated files related to
|
I see you added a changeset file but it does not contain a tag. Please edit the text include at least one of the following tags:
|
@@ -294,31 +293,30 @@ func (ds *inMemoryDataSourceCache) updateCache(ctx context.Context) error { | |||
ds.mu.Lock() | |||
defer ds.mu.Unlock() | |||
|
|||
// check for any errors | |||
_, latestTrrs, latestUpdateErr := ds.executeRun(ctx) |
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 checked for any errors in the pipeline results, which doesn't make sense since multiple bridge data sources are used and not always all of them are successful
// update cache values | ||
ds.latestTrrs = latestTrrs | ||
ds.latestResult = ds.latestTrrs.FinalResult(ds.lggr) | ||
ds.latestUpdateErr = nil |
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.
moved this down to be more cautious since we now don't check for all errors, although median task should handle everything properly
fbd6f37
to
87331bb
Compare
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 needs a test if we are going to claim it fixes a bug, don't you think?
87331bb
to
23ef713
Compare
Quality Gate passedIssues Measures |
I just reverted changes to previous behaviour that already existed. I just didn't realise how pipeline propagates errors and tried to handle errors on my own even if Its hard to write a test that actually tests this. TLDR pipeline has its own err handling logic which is complex and I can't mock this behaviour, it would require a full integration test with this exact scenario. |
I see. I couldn't tell it was a reversion. It reads like a new change. |
…cache (#12907) * Fix inMemoryDataSourceCache get() warn log formatting * Fix in mem ds cache updateCache() to save runs even if some ds failed * Improve in memory data source cache Observe() logs and error messages * Add changeset
* Bump version and update CHANGELOG for core 2.11.0 Signed-off-by: Sneha Agnihotri <[email protected]> * Add jfpc cache staleness alert to config and pass it into jfpc cache (#12595) * Add jfpc cache staleness alert to config and pass it into jfpc cache * Extract JuelsPerFeeCoinCache cfg into a separate struct, improve naming * Changeset * Update config validation test * Reduce changeset to minor * [BCF-3178] - Improve err handling and logs for in memory data source cache (#12907) * Fix inMemoryDataSourceCache get() warn log formatting * Fix in mem ds cache updateCache() to save runs even if some ds failed * Improve in memory data source cache Observe() logs and error messages * Add changeset * Bumping solana validator (#12832) * Bumping solana * Bumping the checksum for solana validator * Update release changelog with cherry pick commits from develop Signed-off-by: Sneha Agnihotri <[email protected]> * Cherry pick: enable jpfc cache by default (#12973) * Draft * Check JuelsPerFeeCoinCache before checking Disable param * Add test * Update NewInMemoryDataSourceCache * Update NewInMemoryDataSourceCache * Update release changelog with cherry pick commits from develop Signed-off-by: Sneha Agnihotri <[email protected]> * Remove duplicates Signed-off-by: Sneha Agnihotri <[email protected]> * Finalize date on changelog for 2.11.0 Signed-off-by: Sneha Agnihotri <[email protected]> * Remove codecov (#13020) (cherry picked from commit 2e99468) --------- Signed-off-by: Sneha Agnihotri <[email protected]> Co-authored-by: ilija42 <[email protected]> Co-authored-by: Damjan Smickovski <[email protected]> Co-authored-by: george-dorin <[email protected]> Co-authored-by: HenryNguyen5 <[email protected]>
* Bump version and update CHANGELOG for core 2.11.0 Signed-off-by: Sneha Agnihotri <[email protected]> * Add jfpc cache staleness alert to config and pass it into jfpc cache (#12595) * Add jfpc cache staleness alert to config and pass it into jfpc cache * Extract JuelsPerFeeCoinCache cfg into a separate struct, improve naming * Changeset * Update config validation test * Reduce changeset to minor * [BCF-3178] - Improve err handling and logs for in memory data source cache (#12907) * Fix inMemoryDataSourceCache get() warn log formatting * Fix in mem ds cache updateCache() to save runs even if some ds failed * Improve in memory data source cache Observe() logs and error messages * Add changeset * Bumping solana validator (#12832) * Bumping solana * Bumping the checksum for solana validator * Update release changelog with cherry pick commits from develop Signed-off-by: Sneha Agnihotri <[email protected]> * Cherry pick: enable jpfc cache by default (#12973) * Draft * Check JuelsPerFeeCoinCache before checking Disable param * Add test * Update NewInMemoryDataSourceCache * Update NewInMemoryDataSourceCache * Update release changelog with cherry pick commits from develop Signed-off-by: Sneha Agnihotri <[email protected]> * Remove duplicates Signed-off-by: Sneha Agnihotri <[email protected]> * Finalize date on changelog for 2.11.0 Signed-off-by: Sneha Agnihotri <[email protected]> * Remove codecov (#13020) (cherry picked from commit 2e99468) --------- Signed-off-by: Sneha Agnihotri <[email protected]> Co-authored-by: ilija42 <[email protected]> Co-authored-by: Damjan Smickovski <[email protected]> Co-authored-by: george-dorin <[email protected]> Co-authored-by: HenryNguyen5 <[email protected]>
Fixes
updateCache()
change/bug that only allowed pipeline results where none of the data sources failed.Improves err handling, logs and err messages.