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

[Access] Added highest indexed height to metadata #5832

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

Guitarheroua
Copy link
Collaborator

@Guitarheroua Guitarheroua commented May 1, 2024

#4757

Added highest indexed height field to Access API endpoints metadata.

@codecov-commenter
Copy link

codecov-commenter commented May 1, 2024

Codecov Report

Attention: Patch coverage is 43.47826% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 55.85%. Comparing base (778a287) to head (3ef278e).
Report is 4 commits behind head on master.

Files Patch % Lines
engine/access/index/reporter.go 37.83% 17 Missing and 6 partials ⚠️
engine/access/index/transaction_results_indexer.go 0.00% 2 Missing ⚠️
engine/access/rpc/engine_builder.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5832      +/-   ##
==========================================
+ Coverage   55.83%   55.85%   +0.01%     
==========================================
  Files        1129     1130       +1     
  Lines       89260    89230      -30     
==========================================
- Hits        49841    49835       -6     
+ Misses      34667    34643      -24     
  Partials     4752     4752              
Flag Coverage Δ
unittests 55.85% <43.47%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Guitarheroua Guitarheroua marked this pull request as ready for review May 2, 2024 10:19
access/handler.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
cmd/access/node_builder/access_node_builder.go Outdated Show resolved Hide resolved
Guitarheroua and others added 5 commits May 9, 2024 11:25
Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
….com:The-K-R-O-K/flow-go into AndriiSlisarchuk/4757-current-indexed-height
engine/access/index/events_index.go Outdated Show resolved Hide resolved
engine/access/index/simple_index.go Outdated Show resolved Hide resolved
access/handler.go Outdated Show resolved Hide resolved
access/handler.go Show resolved Hide resolved
integration/go.mod Outdated Show resolved Hide resolved
access/handler.go Outdated Show resolved Hide resolved
return nil, rpc.ConvertIndexError(err, lastFinalizedHeader.Height, "could not get highest indexed height")
}

metadata.HighestIndexedHeight = highestIndexedHeight
Copy link
Contributor

Choose a reason for hiding this comment

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

we should treat the return value from HighestIndexedHeight as undefined when an error is returned, and explicitly set the value to 0. this makes the intention clear for the next reader, and avoids hard to debug issues in the future if the implementation ever changes.

engine/access/index/reporter.go Outdated Show resolved Hide resolved
Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
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

3 participants