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

Improve error handling in access node #1280

Merged
merged 3 commits into from Sep 13, 2021
Merged

Improve error handling in access node #1280

merged 3 commits into from Sep 13, 2021

Conversation

peterargue
Copy link
Contributor

@peterargue peterargue commented Sep 11, 2021

  • Fix a few error conditions where the fatal error was never thrown because Msg() was not called.
  • Update Module and Component blocks to return the error instead of throwing since the handlers will do that automatically. This makes them more consistent with other uses in the codebase.

@codecov-commenter
Copy link

Codecov Report

Merging #1280 (823fd8f) into master (0a8729c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1280   +/-   ##
=======================================
  Coverage   54.59%   54.59%           
=======================================
  Files         498      498           
  Lines       31533    31533           
=======================================
  Hits        17217    17217           
  Misses      11968    11968           
  Partials     2348     2348           
Flag Coverage Δ
unittests 54.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
engine/collection/synchronization/engine.go 62.90% <0.00%> (-1.08%) ⬇️
...ngine/common/synchronization/finalized_snapshot.go 72.91% <0.00%> (+4.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a8729c...823fd8f. Read the comment docs.

@peterargue peterargue requested review from vishalchangrani, synzhu and huitseeker and removed request for vishalchangrani September 13, 2021 15:22
Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Nice catches!

Copy link
Contributor

@synzhu synzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@synzhu
Copy link
Contributor

synzhu commented Sep 13, 2021

@peterargue Instead of merging using the green button, try commenting below with bors merge :)

@@ -472,10 +472,13 @@ func (anb *FlowAccessNodeBuilder) Build() AccessNodeBuilder {

anb.IngestEng, err = ingestion.New(node.Logger, node.Network, node.State, node.Me, anb.RequestEng, node.Storage.Blocks, node.Storage.Headers, node.Storage.Collections, node.Storage.Transactions, node.Storage.Results, node.Storage.Receipts, anb.TransactionMetrics,
anb.CollectionsToMarkFinalized, anb.CollectionsToMarkExecuted, anb.BlocksToMarkExecuted, anb.RpcEng)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@vishalchangrani vishalchangrani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@peterargue
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Sep 13, 2021

@bors bors bot merged commit ae223b5 into master Sep 13, 2021
@bors bors bot deleted the petera/error-handling branch September 13, 2021 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants