Skip to content

Fix flaky multi-part AOF manifest tests - #4491

Merged
zuiderkwast merged 2 commits into
valkey-io:unstablefrom
quanyeyang:deflake-aof-manifest-tests
Aug 20, 2026
Merged

zuiderkwast merged 2 commits into
valkey-io:unstablefrom
quanyeyang:deflake-aof-manifest-tests

Conversation

@quanyeyang

@quanyeyang quanyeyang commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

The tests counted cumulative error messages in a shared stdout file.
Restrict the matches to the current server PID so port retry log truncation
does not affect the expected count.

Fixes valkey-io#4484
Fixes valkey-io#4485
Fixes valkey-io#4486

Signed-off-by: quanyeyang <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c37b62df-4a2c-4765-bc2a-5d46196c7876

📥 Commits

Reviewing files that changed from the base of the PR and between 5b5227f and 3c605e2.

📒 Files selected for processing (1)
  • tests/integration/aof-multi-part.tcl

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The integration tests clear server stdout before selected invalid AOF manifest cases. They also match invalid-format messages without requiring a PID prefix and retain a single expected error count.

Changes

AOF manifest test expectations

Layer / File(s) Summary
Update invalid manifest assertions
tests/integration/aof-multi-part.tcl
The blank-line, missing-key, short-line, and odd-parameter tests clear stdout before startup. The tests match invalid-format messages without a PID prefix and expect one error.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 3c605

This localized test-only change prevents stale log output from affecting multi-part AOF manifest assertions, with no production behavior impact; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: jsoref

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: fixing flaky multi-part AOF manifest tests.
Description check ✅ Passed The description explains the affected tests and the change that prevents cumulative stdout error counts.
Linked Issues check ✅ Passed The changes address the three linked failures by isolating stdout and correcting invalid-manifest error counts [#4484] [#4485] [#4486].
Out of Scope Changes check ✅ Passed The changes are limited to the affected integration tests and align with the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@valkey-review-bot valkey-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new PID filter is tied to one of the supported log encodings, so the affected tests still fail under alternate log-format runs.

Comment thread tests/integration/aof-multi-part.tcl Resolved
Signed-off-by: quanyeyang <[email protected]>
@quanyeyang
quanyeyang requested a review from zuiderkwast August 20, 2026 15:51
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.82%. Comparing base (11188c2) to head (3c605e2).
⚠️ Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #4491      +/-   ##
============================================
+ Coverage     78.76%   78.82%   +0.05%     
============================================
  Files           170      170              
  Lines         89805    89805              
============================================
+ Hits          70739    70786      +47     
+ Misses        19066    19019      -47     

see 17 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.

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess it's OK to truncate the log file if each server is independent. If we ever want to debug and keep the log file (as with runtest --dont-clean) we could instead count the log lines before and after and compare the difference, or count the log lines only after a certain line - the length of the log file before starting the server. This is done in some other test suites using the helper functions count_log_lines {srv_idx} (executes wc -l) count_message_lines {file pattern}, verify_log_message {srv_idx pattern from_line}, etc.

But I think in this case, truncating is fine. 👍 Thanks.

@zuiderkwast
zuiderkwast merged commit 7536bee into valkey-io:unstable Aug 20, 2026
65 of 66 checks passed
@quanyeyang
quanyeyang deleted the deflake-aof-manifest-tests branch August 21, 2026 02:03
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 9.1 Oct 14, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 8.1 Oct 14, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 7.2 Oct 14, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 8.0 Oct 14, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 9.0 Oct 14, 2026
@github-project-automation github-project-automation Bot moved this from Todo to To be backported in Valkey 9.2 Oct 14, 2026
valkeyrie-ops Bot pushed a commit that referenced this pull request Oct 14, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
valkeyrie-ops Bot pushed a commit that referenced this pull request Oct 14, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
valkeyrie-ops Bot pushed a commit that referenced this pull request Oct 14, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
valkeyrie-ops Bot pushed a commit that referenced this pull request Oct 14, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
valkeyrie-ops Bot pushed a commit that referenced this pull request Oct 14, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
sarthakaggarwal97 pushed a commit that referenced this pull request Oct 15, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 7.2 Oct 15, 2026
sarthakaggarwal97 pushed a commit that referenced this pull request Oct 15, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 9.1 Oct 15, 2026
sarthakaggarwal97 pushed a commit that referenced this pull request Oct 15, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 9.0 Oct 15, 2026
sarthakaggarwal97 pushed a commit that referenced this pull request Oct 26, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 8.1 Oct 26, 2026
sarthakaggarwal97 pushed a commit that referenced this pull request Oct 26, 2026
Fixes #4484
Fixes #4485
Fixes #4486

The tests counted cumulative error messages in a shared stdout file.
Clear the shared server stdout before each affected test so log
assertions
only count messages produced by the current server instance. This avoids
cumulative-count flakes and works with all supported log formats.

---------

Signed-off-by: quanyeyang <[email protected]>
Backport-Source-PR: 4491
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 8.0 Oct 26, 2026
@sarthakaggarwal97 sarthakaggarwal97 moved this from To be backported to Done in Valkey 9.2 Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done
Status: Done
Status: Done
Status: Done
Status: Done
Status: Done

2 participants