-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Beat itest [3/3]: fix all itest flakes #9260
base: yy-beat-itest-flakes
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Pull reviewers statsStats of the last 30 days for lnd:
|
OMG, what is this sorcery? I don't think I've ever seen this on an You are my hero, @yyforyongyu! |
It's a bit of cheating as the unit tests are skipped for me to quickly get the CI results🤓 Plus I know there are two more bugs that can cause itest to fail - one is sql-related and the other is graph, but yeah, at least the flakes are fixed and we should see this as a norm in 2025! |
315ff72
to
2c92455
Compare
be8726e
to
5a07ffa
Compare
2c92455
to
88350c6
Compare
c2aeb68
to
67f9404
Compare
88350c6
to
e259d59
Compare
67f9404
to
ee869a2
Compare
e259d59
to
11587b8
Compare
ee869a2
to
4bdf873
Compare
11587b8
to
a744740
Compare
4bdf873
to
db80ec6
Compare
a744740
to
d8e61c8
Compare
e24d6b9
to
7fba4ab
Compare
d8e61c8
to
43247ea
Compare
446296c
to
9f93fdd
Compare
43247ea
to
269bfd7
Compare
7e1c2d4
to
b70b0b0
Compare
269bfd7
to
b1011ac
Compare
@guggero: review reminder |
There's no need to mine 80ish blocks here.
So the test can run faster.
Also removed the duplicate test cases.
To make the CI indicative, we now starting tracking the flaky tests found when running on Windows. As a starting point, rather than ignore the windows CI entirely, we now identify there are cases where lnd can be buggy when running in windows. We should fix the tests in the future, otherwise the windows build should be deleted.
Most of the time we only need to fund the node with given number of UTXOs without concerning the amount, so we add the more efficient funding method as it mines a single block in the end.
b1011ac
to
d8d2a54
Compare
6cee660
to
7ed3548
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge concept ACK!
Will need another round of review to make sure all the refactored test cases still execute the same code paths.
But just the fact that I can now run ALL integration tests locally in just 6.3 minutes is amazing (make itest-parallel tranches=32
).
Since things should be way more stable now as well, should we also attempt to bump the number of tranches running in parallel for the CI runs?
- name: run itest | ||
run: PATH=$PATH:/tmp/bitcoin/bin make itest-parallel tranches=${{ env.TRANCHES }} backend=bitcoind shuffleseed=${{ github.run_id }} | ||
run: PATH=$PATH:/tmp/bitcoin/bin make itest-parallel tranches=${{ env.TRANCHES }} shuffleseed=${{ github.run_id }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is btcd
faster for these tests or just more stable? Or is the main motivation behind this to remove the additional custom setup above?
|
||
// If the number of blocks is less than 40, we consider the test | ||
// healthy. | ||
if blocksMined < 40 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -670,4 +666,5 @@ func init() { | |||
allTestCases = append(allTestCases, channelFeePolicyTestCases...) | |||
allTestCases = append(allTestCases, walletImportAccountTestCases...) | |||
allTestCases = append(allTestCases, basicFundingTestCases...) | |||
allTestCases = append(allTestCases, sendToRouteTestCases...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all the tests that we add to the list here, should we add a static prefix to their names here and then have more short names in the actual slice where they're defined? Would perhaps help to locate them a bit more easily?
Example (dummy code):
allTestCases = appendPrefixed(allTestCases, "send to route", sendToRouteTestCases...)
...
var sendToRouteTestCases = []*lntest.TestCase{
{
Name: "single hop sync",
},
{
Name: "single hop stream",
},
{
Name: "single hop v2",
},
}
But just an idea and non-blocking.
// be excluded from the test suite atm. | ||
// | ||
// TODO(yy): fix these tests and remove them from this list. | ||
var excludedTestsWindows = []string{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uff, that's quite a list.... Do we have any idea what causes most of these to fail? Different behavior in network related code?
Fix all the itest flakes to make sure the
blockbeat
works as expected. The key results,All itest flakes are now documented and fixed.
A large decrease in the time taken to run the CI, e.g., for btcd itest, previously it took 45m and now it takes around 18m.
Check #9306 for more context.
In this final PR, we focus on breaking down the large tests into smaller ones, skipping some flaky tests for windows, and minor flake fixes.