Skip to content

Deflake async peer registration and harden PeerList.All#2999

Merged
masih merged 5 commits intomainfrom
masih/ractor-block-prov-deflake
Mar 5, 2026
Merged

Deflake async peer registration and harden PeerList.All#2999
masih merged 5 commits intomainfrom
masih/ractor-block-prov-deflake

Conversation

@masih
Copy link
Collaborator

@masih masih commented Mar 2, 2026

TestReactor_BlockProviders flakes because peer connectivity is established before the reactor has asynchronously processed peer-updates and appended all peers to r.peers.

Fix this categorically by:

  • waiting in reactorTestSuite.AddPeer until the new peer is visible in reactor.peers before returning;
  • making PeerList.All() return a copy (snapshot) instead of the internal slice;
  • adding TestPeerListAllReturnsSnapshot to enforce snapshot semantics.

This removes timing-sensitive reads of partially-registered peers and prevents callers from observing/mutating shared peer-list backing storage.

TestReactor_BlockProviders flakes because peer connectivity is
established before the reactor has asynchronously processed peer-updates
and appended all peers to r.peers.

Fix this categorically by:

* waiting in reactorTestSuite.AddPeer until the new peer is visible in
  reactor.peers before returning;
* making PeerList.All() return a copy (snapshot) instead of the internal
  slice;
* adding TestPeerListAllReturnsSnapshot to enforce snapshot semantics.

This removes timing-sensitive reads of partially-registered peers and
prevents callers from observing/mutating shared peer-list
backing storage.
@masih masih requested review from arajasek and pompon0 March 2, 2026 13:51
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 5, 2026, 12:10 PM

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.21%. Comparing base (0fea76f) to head (4484665).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2999      +/-   ##
==========================================
- Coverage   58.40%   58.21%   -0.20%     
==========================================
  Files        2110     2112       +2     
  Lines      175009   173397    -1612     
==========================================
- Hits       102213   100942    -1271     
+ Misses      63767    63456     -311     
+ Partials     9029     8999      -30     
Flag Coverage Δ
sei-chain-pr 73.21% <100.00%> (?)
sei-db 70.41% <ø> (ø)

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

Files with missing lines Coverage Δ
sei-tendermint/internal/statesync/dispatcher.go 79.68% <100.00%> (+5.87%) ⬆️

... and 79 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masih masih enabled auto-merge (squash) March 5, 2026 12:09
@masih masih merged commit 5970d05 into main Mar 5, 2026
39 checks passed
@masih masih deleted the masih/ractor-block-prov-deflake branch March 5, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants