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

congestion: runtime test for outgoing buffer #11305

Merged
merged 7 commits into from
May 20, 2024

Conversation

jakmeier
Copy link
Contributor

Test on Runtime::apply level that buffering and forwarding works.

This is complementary to unit tests in congestion_info.rs,
balance_checker.rs, receipt_column_helper.rs, and of course
integrations tests.

@jakmeier
Copy link
Contributor Author

In draft until #11300 is merged, which this depends on for tests to pass.

Copy link

codecov bot commented May 14, 2024

Codecov Report

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

Project coverage is 71.15%. Comparing base (9063a2c) to head (cc16e15).
Report is 1 commits behind head on master.

Files Patch % Lines
runtime/runtime/src/lib.rs 98.64% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11305      +/-   ##
==========================================
+ Coverage   71.08%   71.15%   +0.07%     
==========================================
  Files         783      783              
  Lines      156833   157050     +217     
  Branches   156833   157050     +217     
==========================================
+ Hits       111477   111755     +278     
+ Misses      40528    40462      -66     
- Partials     4828     4833       +5     
Flag Coverage Δ
backward-compatibility 0.24% <0.00%> (ø)
db-migration 0.24% <0.00%> (ø)
genesis-check 1.39% <0.00%> (ø)
integration-tests 37.09% <0.90%> (+0.03%) ⬆️
linux 68.82% <79.27%> (+0.02%) ⬆️
linux-nightly 70.57% <95.04%> (+0.04%) ⬆️
macos 52.20% <0.00%> (-0.02%) ⬇️
pytests 1.61% <0.00%> (ø)
sanity-checks 1.40% <0.00%> (ø)
unittests 65.58% <98.64%> (+0.07%) ⬆️
upgradability 0.29% <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.

Test on Runtime::apply level that buffering and forwarding works.

This is complementary to unit tests in congestion_info.rs,
balance_checker.rs,  receipt_column_helper.rs, and of course
integrations tests.
@jakmeier jakmeier force-pushed the congestion-buffer-apply-test branch from c4674a1 to 14fb2e7 Compare May 15, 2024 09:59
@jakmeier jakmeier requested a review from wacban May 15, 2024 10:47
@jakmeier jakmeier marked this pull request as ready for review May 15, 2024 10:47
@jakmeier jakmeier requested a review from a team as a code owner May 15, 2024 10:47
@jakmeier
Copy link
Contributor Author

This is ready for review, in theory. But I would rather complete and merge #11307 first and adjust this PR to use the config values.
It probably makes sense to wait with reviewing it until then.

fixes a bug introduces in upstream

(and update to use config parameters added in upstream)
@@ -1820,7 +1822,7 @@ impl Runtime {
proof,
delayed_receipts_count: delayed_receipts.len(),
metrics: Some(metrics),
congestion_info: congestion_info.map(|info| info.congestion_info),
congestion_info: congestion_control.map(|c| *c.congestion_info()),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes a bug introduced in #11307.
We must return the modified congestion info, not the input congestion info.

The tests added by in this PR catches it, while existing tests didn't.

@jakmeier
Copy link
Contributor Author

@wacban this is now ready for review, using the new runtime parameters and updated to use the new interface. Plus a small fix that slipped in and previous tests didn't cover.

Copy link
Contributor

@wacban wacban left a comment

Choose a reason for hiding this comment

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

LGTM

@jakmeier jakmeier added this pull request to the merge queue May 20, 2024
Merged via the queue into near:master with commit ae06f37 May 20, 2024
28 of 29 checks passed
@jakmeier jakmeier deleted the congestion-buffer-apply-test branch May 20, 2024 14:44
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

2 participants