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

fix(metrics): fix false positives in the near_num_invalid_blocks metric #10468

Merged
merged 1 commit into from
Jan 20, 2024

Conversation

marcelo-gonzalez
Copy link
Contributor

#9316 extracted maybe_mark_block_invalid() as a helper function, but it changed the behavior so that near_num_invalid_blocks is incremented even if we're not marking a block as invalid. So fix it by just putting that metric increment inside the if block like it was before

near#9316 extracted
maybe_mark_block_invalid() as a helper function, but it changed the
behavior so that near_num_invalid_blocks is incremented even if we're
not marking a block as invalid.  So fix it by just putting that metric
increment inside the if block like it was before
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cd32e1a) 71.96% compared to head (81dbe3a) 71.96%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10468      +/-   ##
==========================================
- Coverage   71.96%   71.96%   -0.01%     
==========================================
  Files         719      719              
  Lines      145133   145133              
  Branches   145133   145133              
==========================================
- Hits       104448   104446       -2     
+ Misses      35885    35880       -5     
- Partials     4800     4807       +7     
Flag Coverage Δ
backward-compatibility 0.08% <0.00%> (ø)
db-migration 0.08% <0.00%> (ø)
genesis-check 1.26% <0.00%> (ø)
integration-tests 36.84% <100.00%> (+0.05%) ⬆️
linux 71.42% <100.00%> (-0.02%) ⬇️
linux-nightly 71.51% <100.00%> (-0.01%) ⬇️
macos 55.38% <100.00%> (+0.18%) ⬆️
pytests 1.48% <0.00%> (ø)
sanity-checks 1.27% <0.00%> (ø)
unittests 68.05% <100.00%> (-0.01%) ⬇️
upgradability 0.13% <0.00%> (ø)

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.

@Longarithm Longarithm added this pull request to the merge queue Jan 20, 2024
Merged via the queue into near:master with commit 55f5586 Jan 20, 2024
26 checks passed
posvyatokum pushed a commit that referenced this pull request Jan 22, 2024
…ic (#10468)

#9316 extracted
maybe_mark_block_invalid() as a helper function, but it changed the
behavior so that near_num_invalid_blocks is incremented even if we're
not marking a block as invalid. So fix it by just putting that metric
increment inside the if block like it was before
marcelo-gonzalez added a commit to marcelo-gonzalez/nearcore that referenced this pull request Jan 23, 2024
…ic (near#10468)

near#9316 extracted
maybe_mark_block_invalid() as a helper function, but it changed the
behavior so that near_num_invalid_blocks is incremented even if we're
not marking a block as invalid. So fix it by just putting that metric
increment inside the if block like it was before
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.

2 participants