[CI] Clean up dead and broken CI test infrastructure - #8643
[CI] Clean up dead and broken CI test infrastructure#8643janezpodhostnik wants to merge 1 commit into
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
📝 WalkthroughWalkthroughThe change removes the flaky-test monitoring workflow and Go processing pipeline, updates CI test setup and coverage paths, migrates matrix output to ChangesCI and test monitoring
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant TestMatrixGenerator
participant GITHUB_OUTPUT
participant CIWorkflow
TestMatrixGenerator->>GITHUB_OUTPUT: Write dynamicMatrix JSON
GITHUB_OUTPUT->>CIWorkflow: Supply the generated test matrix
CIWorkflow->>CIWorkflow: Run configured test jobs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tools/test_matrix_generator/matrix.go`:
- Around line 115-123: Update the GITHUB_OUTPUT write path in matrix.go so
failures in both the fmt.Fprintf call and the deferred file close are handled
explicitly instead of using panic(fmt.Errorf(...)). Route these fatal errors
through the repository’s irrecoverable API, and make sure the close error is
captured and reported even when the write succeeds. Keep the existing output
formatting and the OpenFile/Fprintf flow in the matrix generation logic intact.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 220c754e-e063-4a0c-86c9-f31702a388d7
📒 Files selected for processing (109)
.github/workflows/actions/test-monitor-process-results/action.yml.github/workflows/ci.yml.github/workflows/flaky-test-monitor.ymlMakefileintegration/tests/epochs/base_suite.gointegration/tests/epochs/dynamic_epoch_transition_suite.gotools/test_matrix_generator/matrix.gotools/test_monitor/common/config.gotools/test_monitor/common/level1.gotools/test_monitor/common/level2.gotools/test_monitor/common/level3.gotools/test_monitor/common/testdata/test_data.gotools/test_monitor/common/utility.gotools/test_monitor/level1/process_summary1_results.gotools/test_monitor/level1/process_summary1_results_test.gotools/test_monitor/level2/process_summary2_results.gotools/test_monitor/level2/process_summary2_results_test.gotools/test_monitor/level3/flaky-test-monitor.jsontools/test_monitor/level3/process_summary3_results.gotools/test_monitor/level3/process_summary3_results_test.gotools/test_monitor/schemas/skipped_tests_schema.jsontools/test_monitor/schemas/test_results_schema.jsontools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-1-count-fail.jsontools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-1-count-pass.jsontools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-1-count-skip-pass.jsontools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-10-count-fail.jsontools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-10-count-pass.jsontools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-2-count-pass.jsontools/test_monitor/testdata/summary1/raw/test-result-exception-others-normal-3-count-pass.jsontools/test_monitor/testdata/summary1/raw/test-result-exception-single-1-count-pass.jsontools/test_monitor/testdata/summary1/raw/test-result-exception-single-5-count-4-nil-1-normal-pass.jsontools/test_monitor/testdata/summary1/raw/test-result-exception-single-5-count-pass.jsontools/test_monitor/testdata/summary2/test1-1package-1failure/expected-output/failures/TestSanitySha3_256+github.com-onflow-crypto-hash/failure1.txttools/test_monitor/testdata/summary2/test1-1package-1failure/expected-output/test1-1package-1failure.jsontools/test_monitor/testdata/summary2/test1-1package-1failure/input/test-result-crypto-hash-1-count-fail.jsontools/test_monitor/testdata/summary2/test2-1-exception/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception1.txttools/test_monitor/testdata/summary2/test2-1-exception/expected-output/test2-1-exception.jsontools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception1.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception10.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception11.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception12.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception13.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception2.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception3.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception4.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception5.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception6.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception7.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception8.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception9.txttools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/test3-multi-exceptions.jsontools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure1.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure10.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure2.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure3.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure4.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure5.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure6.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure7.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure8.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure9.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha3_256+github.com-onflow-crypto-hash/failure1.txttools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/test4-multi-failures.jsontools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception1.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception10.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception11.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception12.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception13.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception2.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception3.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception4.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception5.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception6.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception7.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception8.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception9.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure1.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure10.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure2.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure3.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure4.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure5.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure6.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure7.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure8.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure9.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha3_256+github.com-onflow-crypto-hash/failure1.txttools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/test5-multi-failures-multi-exceptions.jsontools/test_monitor/testdata/summary3/test1-1package-1failure/expected-output/test1-1package-1failure.jsontools/test_monitor/testdata/summary3/test1-1package-1failure/input/flaky-test-monitor.jsontools/test_monitor/testdata/summary3/test1-1package-1failure/input/test1-1package-1failure.jsontools/test_monitor/testdata/summary3/test2-1-exception/expected-output/test2-1-exception.jsontools/test_monitor/testdata/summary3/test2-1-exception/input/flaky-test-monitor.jsontools/test_monitor/testdata/summary3/test2-1-exception/input/test2-1-exception.jsontools/test_monitor/testdata/summary3/test3-multi-exceptions/expected-output/test3-multi-exceptions.jsontools/test_monitor/testdata/summary3/test3-multi-exceptions/input/flaky-test-monitor.jsontools/test_monitor/testdata/summary3/test3-multi-exceptions/input/test3-multi-exceptions.jsontools/test_monitor/testdata/summary3/test4-multi-failures/expected-output/test4-multi-failures.jsontools/test_monitor/testdata/summary3/test4-multi-failures/input/flaky-test-monitor.jsontools/test_monitor/testdata/summary3/test4-multi-failures/input/test4-multi-failures.jsontools/test_monitor/testdata/summary3/test5-multi-durations/expected-output/test5-multi-durations.jsontools/test_monitor/testdata/summary3/test5-multi-durations/input/flaky-test-monitor.jsontools/test_monitor/testdata/summary3/test5-multi-durations/input/test5-multi-durations.jsontools/test_monitor/testdata/summary3/test6-multi-failures-cap/expected-output/test6-multi-failures-cap.jsontools/test_monitor/testdata/summary3/test6-multi-failures-cap/input/flaky-test-monitor.jsontools/test_monitor/testdata/summary3/test6-multi-failures-cap/input/test6-multi-failures-cap.jsontools/test_monitor/testdata/summary3/test7-multi-durations-cap/expected-output/test7-multi-durations-cap.jsontools/test_monitor/testdata/summary3/test7-multi-durations-cap/input/flaky-test-monitor.jsontools/test_monitor/testdata/summary3/test7-multi-durations-cap/input/test7-multi-durations-cap.json
💤 Files with no reviewable changes (105)
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception4.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception5.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception9.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception6.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception11.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception13.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception1.txt
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure9.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception12.txt
- tools/test_monitor/testdata/summary3/test5-multi-durations/input/flaky-test-monitor.json
- tools/test_monitor/testdata/summary3/test7-multi-durations-cap/input/flaky-test-monitor.json
- tools/test_monitor/testdata/summary3/test3-multi-exceptions/input/flaky-test-monitor.json
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure7.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure2.txt
- tools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-2-count-pass.json
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception3.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception2.txt
- tools/test_monitor/testdata/summary3/test5-multi-durations/input/test5-multi-durations.json
- tools/test_monitor/testdata/summary3/test3-multi-exceptions/input/test3-multi-exceptions.json
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception7.txt
- tools/test_monitor/testdata/summary3/test1-1package-1failure/input/test1-1package-1failure.json
- tools/test_monitor/testdata/summary3/test6-multi-failures-cap/input/flaky-test-monitor.json
- tools/test_monitor/testdata/summary3/test7-multi-durations-cap/expected-output/test7-multi-durations-cap.json
- tools/test_monitor/testdata/summary3/test1-1package-1failure/input/flaky-test-monitor.json
- tools/test_monitor/testdata/summary3/test5-multi-durations/expected-output/test5-multi-durations.json
- tools/test_monitor/testdata/summary3/test2-1-exception/expected-output/test2-1-exception.json
- tools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-1-count-pass.json
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception1.txt
- tools/test_monitor/testdata/summary2/test2-1-exception/expected-output/test2-1-exception.json
- tools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-1-count-fail.json
- tools/test_monitor/testdata/summary1/raw/test-result-exception-single-1-count-pass.json
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure8.txt
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha3_256+github.com-onflow-crypto-hash/failure1.txt
- tools/test_monitor/testdata/summary1/raw/test-result-exception-single-5-count-4-nil-1-normal-pass.json
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception8.txt
- tools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-10-count-fail.json
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception3.txt
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure2.txt
- tools/test_monitor/testdata/summary3/test1-1package-1failure/expected-output/test1-1package-1failure.json
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure5.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure7.txt
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/test4-multi-failures.json
- tools/test_monitor/testdata/summary2/test1-1package-1failure/expected-output/failures/TestSanitySha3_256+github.com-onflow-crypto-hash/failure1.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure8.txt
- tools/test_monitor/testdata/summary2/test1-1package-1failure/expected-output/test1-1package-1failure.json
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception9.txt
- tools/test_monitor/schemas/test_results_schema.json
- tools/test_monitor/testdata/summary2/test2-1-exception/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception1.txt
- tools/test_monitor/testdata/summary3/test4-multi-failures/input/flaky-test-monitor.json
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/test3-multi-exceptions.json
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception4.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception10.txt
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception6.txt
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception2.txt
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception7.txt
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception11.txt
- tools/test_monitor/testdata/summary3/test3-multi-exceptions/expected-output/test3-multi-exceptions.json
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure1.txt
- tools/test_monitor/testdata/summary3/test4-multi-failures/input/test4-multi-failures.json
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha3_256+github.com-onflow-crypto-hash/failure1.txt
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception5.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure9.txt
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception12.txt
- tools/test_monitor/testdata/summary1/raw/test-result-exception-others-normal-3-count-pass.json
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception13.txt
- tools/test_monitor/testdata/summary3/test6-multi-failures-cap/expected-output/test6-multi-failures-cap.json
- tools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-1-count-skip-pass.json
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception8.txt
- tools/test_monitor/testdata/summary1/raw/test-result-exception-single-5-count-pass.json
- tools/test_monitor/testdata/summary3/test2-1-exception/input/test2-1-exception.json
- tools/test_monitor/schemas/skipped_tests_schema.json
- tools/test_monitor/testdata/summary3/test6-multi-failures-cap/input/test6-multi-failures-cap.json
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure6.txt
- tools/test_monitor/testdata/summary3/test2-1-exception/input/flaky-test-monitor.json
- tools/test_monitor/common/config.go
- tools/test_monitor/testdata/summary2/test3-multi-exceptions/expected-output/exceptions/TestEncodableRandomBeaconPrivKeyMsgPack+github.com-onflow-flow-go-model-encodable/exception10.txt
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure1.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/test5-multi-failures-multi-exceptions.json
- tools/test_monitor/common/level1.go
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure5.txt
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure4.txt
- tools/test_monitor/level3/process_summary3_results.go
- tools/test_monitor/testdata/summary3/test4-multi-failures/expected-output/test4-multi-failures.json
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure6.txt
- Makefile
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure10.txt
- tools/test_monitor/level3/flaky-test-monitor.json
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure4.txt
- tools/test_monitor/common/level2.go
- tools/test_monitor/common/utility.go
- tools/test_monitor/common/level3.go
- tools/test_monitor/level3/process_summary3_results_test.go
- tools/test_monitor/testdata/summary2/test5-multi-failures-multi-exceptions/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure3.txt
- tools/test_monitor/testdata/summary2/test1-1package-1failure/input/test-result-crypto-hash-1-count-fail.json
- tools/test_monitor/level2/process_summary2_results.go
- .github/workflows/actions/test-monitor-process-results/action.yml
- .github/workflows/flaky-test-monitor.yml
- tools/test_monitor/level1/process_summary1_results.go
- tools/test_monitor/testdata/summary1/raw/test-result-crypto-hash-10-count-pass.json
- tools/test_monitor/common/testdata/test_data.go
- tools/test_monitor/level1/process_summary1_results_test.go
- tools/test_monitor/level2/process_summary2_results_test.go
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure3.txt
- tools/test_monitor/testdata/summary3/test7-multi-durations-cap/input/test7-multi-durations-cap.json
- tools/test_monitor/testdata/summary2/test4-multi-failures/expected-output/failures/TestSanitySha2_256+github.com-onflow-crypto-hash/failure10.txt
| f, err := os.OpenFile(outputFile, os.O_APPEND|os.O_WRONLY, 0o644) | ||
| if err != nil { | ||
| panic(fmt.Errorf("failed to open GITHUB_OUTPUT file: %w", err)) | ||
| } | ||
| defer f.Close() | ||
| // the compacted JSON is a single line, so the simple name=value format is sufficient (no multiline delimiter needed) | ||
| if _, err := fmt.Fprintf(f, "%s=%s\n", ciMatrixName, b); err != nil { | ||
| panic(fmt.Errorf("failed to write test matrix to GITHUB_OUTPUT: %w", err)) | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 3 '\birrecoverable\b|panic\(fmt\.Errorf|\.Close\(\)' --glob '*.go'Repository: onflow/flow-go
Length of output: 152
🏁 Script executed:
#!/bin/bash
set -u
echo "== tracked Go files candidates =="
git ls-files '*.go' | sed -n '1,80p'
echo
echo "== locate matrix.go and irrecoverable =="
fd -a 'matrix\.go|irrecoverable|component\.go|GoDocs|CodingConventions' . 2>/dev/null | sed -n '1,120p'
echo
echo "== search irrecoverable package references (all files) =="
rg -n -C 2 'irrecoverable|panic\(fmt\.Errorf|\\.Close\\(\\)' . --glob '*.go' 2>/dev/null | sed -n '1,200p'Repository: onflow/flow-go
Length of output: 18083
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== matrix.go =="
cat -n tools/test_matrix_generator/matrix.go | sed -n '1,180p'
echo
echo "== module/irrecoverable API =="
cat -n module/irrecoverable/irrecoverable.go | sed -n '1,220p'
echo
echo "== module/component Component interface =="
cat -n module/component/component.go | sed -n '1,220p'
echo
echo "== deterministic Go output/close/error handling references from stdlib docs/source if available =="
if command -v go >/dev/null 2>&1; then
go doc os.OpenFile 2>/dev/null | sed -n '1,120p'
echo
go doc os.File.Close 2>/dev/null | sed -n '1,120p'
else
echo "go command unavailable"
fiRepository: onflow/flow-go
Length of output: 22818
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import tempfile
import os
import subprocess
tmp = tempfile.mkdtemp()
f = os.path.join(tmp, "g")
os.close(os.open(f, os.O_WRONLY | os.O_CREAT, 0o644))
os.chmod(tmp, 0o000) # parent dir unreadable prevents append create/close path
p = subprocess.run(
["go", "run", "-"],
input=f"""
package main
import (
"fmt"
"os"
)
func main() {{
file, err := os.OpenFile({f!r}, os.O_APPEND|os.O_WRONLY, 0o644)
if err != nil {{
fmt.Println("open_err=", err)
return
}}
fmt.Println("open_ok")
n, werr := fmt.Fprintln(file, "x")
fmt.Printf("write_n=%d write_err=%v\\n", n, werr)
cerr := file.Close()
fmt.Printf("close_err=%v\\n", cerr)
}}
""",
capture_output=True,
text=True,
)
print(p.stdout, p.stderr)
print("returncode=", p.returncode)
# Show write-only-file Close error on fd that accepts data but has no name to flush.
fd = os.open(f, os.O_WRONLY | os.O_CREAT | os.O_APPEND, 0o644)
p2 = subprocess.run(
["go", "run", "-"],
input=f"""
package main
import (
"fmt"
"os"
)
func main() {{
file := os.NewFile({fd}, "")
n, werr := fmt.Fprintln(file, "x")
fmt.Printf("write_n=%d write_err=%v\\n", n, werr)
cerr := file.Close()
fmt.Printf("close_err=%v\\n", cerr)
}}
""",
capture_output=True,
text=True,
)
print(p2.stdout, p2.stderr)
print("writeonly_returncode=", p2.returncode)
PYRepository: onflow/flow-go
Length of output: 333
🌐 Web query:
Go os.File Close documentation writes pending data return error
💡 Result:
Yes, os.File.Close can return an error if pending data writes fail [1][2]. In Go, when you write data to a file, the operating system may buffer that data in memory rather than writing it immediately to the underlying storage medium [1][2]. Consequently, an error that occurs during the actual flushing of these buffers—such as a disk I/O error or a failure to commit data—might not be surfaced until the file is closed or explicitly synchronized [1][2]. Because os.File.Close handles the final release of the file descriptor and can trigger the flushing of these remaining buffers, it is a critical point for error reporting [3][1][2]. If you ignore the error returned by Close (for example, by using defer f.Close without capturing the error), you may fail to detect that data was not successfully persisted [3][1]. To ensure data integrity when writing to files: 1. Always check the error returned by Close [1]. 2. If it is critical to know that data has been safely flushed to the physical device before closing, consider calling f.Sync before Close [3][1][2]. Sync forces the operating system to flush its write buffers for the file to the underlying storage [3][1]. Any error returned by Sync should also be checked [3][1].
Citations:
- 1: https://codeql.github.com/codeql-query-help/go/go-unhandled-writable-file-close/
- 2: https://stackoverflow.com/questions/62598673/when-should-os-file-close-be-called-explicitly
- 3: https://www.joeshaw.org/dont-defer-close-on-writable-files/
Handle all GITHUB_OUTPUT errors explicitly.
A deferred f.Close() can still fail after fmt.Fprintf; capturing and reporting both write and close errors prevents a failed matrix write from exiting successfully. For the required Go exception handling, route these fatal failures through the repository's irrecoverable API instead of panic(fmt.Errorf(...)).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tools/test_matrix_generator/matrix.go` around lines 115 - 123, Update the
GITHUB_OUTPUT write path in matrix.go so failures in both the fmt.Fprintf call
and the deferred file close are handled explicitly instead of using
panic(fmt.Errorf(...)). Route these fatal errors through the repository’s
irrecoverable API, and make sure the close error is captured and reported even
when the write succeeds. Keep the existing output formatting and the
OpenFile/Fprintf flow in the matrix generation logic intact.
Source: Coding guidelines
Remove CI test infrastructure that is dead, broken, or deprecated, and fix two silent misconfigurations in the unit test workflow.
Changes
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit