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

Add Logging to Diagnose Flaky CI PostgreSQL Integration Test #1308

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Jan 17, 2025

I observed flakiness in the CI PostgreSQL integration tests. Here's an example of a failure: https://github.com/lightninglabs/taproot-assets/actions/runs/12827900128/attempts/1?pr=1307

The issue occurred around commit ffef906.

This might be happening because proofs are being transferred manually before the tapd state machine has a chance to process them. Alternatively, it could be due to tapd returning an error in the event stream with an out-of-order send state, realizing it cannot transfer the proofs that haven't yet been manually transferred.

To address this, I've added additional logging to help diagnose the issue if the flakiness occurs again.

2025-01-17T11:23:01.4314022Z     assertions.go:1023: 
2025-01-17T11:23:01.4314648Z         	Error Trace:	/home/runner/work/taproot-assets/taproot-assets/itest/assertions.go:1023
2025-01-17T11:23:01.4315710Z         	            				/home/runner/work/taproot-assets/taproot-assets/itest/psbt_test.go:1389
2025-01-17T11:23:01.4316730Z         	            				/home/runner/work/taproot-assets/taproot-assets/itest/test_harness.go:159
2025-01-17T11:23:01.4317786Z         	            				/home/runner/work/taproot-assets/taproot-assets/itest/integration_test.go:94
2025-01-17T11:23:01.4318729Z         	Error:      	Not equal: 
2025-01-17T11:23:01.4319629Z         	            	expected: "SendStateTransferProofs"
2025-01-17T11:23:01.4320322Z         	            	actual  : "SendStateComplete"
2025-01-17T11:23:01.4320658Z         	            	
2025-01-17T11:23:01.4320936Z         	            	Diff:
2025-01-17T11:23:01.4321294Z         	            	--- Expected
2025-01-17T11:23:01.4321631Z         	            	+++ Actual
2025-01-17T11:23:01.4322052Z         	            	@@ -1 +1 @@
2025-01-17T11:23:01.4322715Z         	            	-SendStateTransferProofs
2025-01-17T11:23:01.4323204Z         	            	+SendStateComplete
2025-01-17T11:23:01.4332764Z         	Test:       	TestTaprootAssetsDaemon/psbt_multi_send
2025-01-17T11:23:01.4333445Z 2025-01-17 11:23:01.317 [INF] TSVR: Stopping Main Server

Full log file: 4_run itest.txt

@ffranr ffranr requested review from guggero and GeorgeTsagk January 17, 2025 12:34
@ffranr ffranr self-assigned this Jan 17, 2025
Improve error feedback to make diagnosing flaky tests easier.
@coveralls
Copy link

coveralls commented Jan 17, 2025

Pull Request Test Coverage Report for Build 12829211327

Details

  • 0 of 9 (0.0%) changed or added relevant lines in 1 file are covered.
  • 26 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.02%) to 40.816%

Changes Missing Coverage Covered Lines Changed/Added Lines %
itest/assertions.go 0 9 0.0%
Files with Coverage Reduction New Missed Lines %
itest/assertions.go 1 0.0%
fn/option.go 3 43.3%
tapgarden/caretaker.go 4 68.5%
tapchannel/aux_leaf_signer.go 5 43.08%
asset/mock.go 6 91.84%
asset/asset.go 7 76.84%
Totals Coverage Status
Change from base Build 12825362300: -0.02%
Covered Lines: 26642
Relevant Lines: 65274

💛 - Coveralls

@ffranr ffranr enabled auto-merge January 17, 2025 13:46
Copy link
Member

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

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

Lgtm 🌟

@ffranr ffranr added this pull request to the merge queue Jan 17, 2025
Merged via the queue into main with commit d8b9974 Jan 17, 2025
18 checks passed
@guggero guggero deleted the itest-flake-log branch January 17, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants