Repository navigation
CBEF-123: Keep flaky spec tests in their own list - #194
Open
davidkelly wants to merge 3 commits into
Open
davidkelly wants to merge 3 commits into
davidkelly wants to merge 3 commits into
Conversation
Contributor
Author
|
Merge order for the spec-test PRs: #194 → #192 → #193, stacked in that order.
Merge one PR at a time from the bottom. GitHub retargets and rebases the next PR after each merge. Do not merge an upper PR first: the merge API for stacked PRs also merges every open PR below it. |
Motivation ========== The nightly spec run on main has failed since 2026-11-21 with no code change. known-failures.txt is taken from one run, so a flaky test that passed in that run is removed, and the nightly fails when it fails again. Across four runs of the same code, 45 tests both passed and failed; 7 of them were not listed, and they are the nightly's new failures. Modification ============ - flaky.txt lists tests that may pass or fail. compare-baseline.py ignores their outcome, and --update never writes them to known-failures.txt. - scripts/find-flaky.py finds tests that both passed and failed across several runs of the same code; --update moves them to flaky.txt. - flaky.txt: the 45 tests, from the baseline run and the nightlies of 11-21 to 11-23. 38 of them leave known-failures.txt. - known-failures.txt: 49 entries that passed in all four runs leave. They had been kept by hand as flaky, but they are not. - CONTRIBUTING.md and spec-tests.yml describe flaky.txt. Results ======= All four runs, including the three failed nightlies, have no failures outside the lists.
Motivation ========== CBEF-132 (#195) made Count() exact under RequestPlus. That was the cause of the flaky overlapping GraphUpdates and Transaction tests. Modification ============ Remove the 22 overlapping GraphUpdates and 10 TransactionCouchbaseTest entries from flaky.txt. Results ======= All 32 passed in both spec runs with the fix (45306660214 and 45425994911). The full run has no failures outside the baseline.
davidkelly
force-pushed
the
spec-flaky-tests
branch
from
November 24, 2026 19:06
d020e87 to
a255d5f
Compare
emilienbev
reviewed
Nov 25, 2026
emilienbev
left a comment
There was a problem hiding this comment.
Nice and small, and the numbers in the description add up.
Two concerns, both fine as a follow-up if you want the nightly green first.
- A test in
flaky.txthas no way out. One that starts to fail every night, or one that a fix made stable, stays invisible. The 32 entries from CBEF-132 were one real bug, so the 13 that remain may be real bugs too. Is there a ticket for them? - The two scripts now hold two copies of the list read and write, with slightly different rules for blank lines.
Motivation ========== Review of #194: a test in flaky.txt that fails every night, or that a fix made stable, is invisible. The list code is copied between the scripts, and a wrong --baseline path makes find-flaky create a new header-only file. Some comments still describe the flow before find-flaky. Modification ============ - New scripts/testlists.py holds the default paths, the read and write of both lists (one rule for blank lines and trailing whitespace) and read_results. compare-baseline.py and find-flaky.py use it. - compare-baseline.py lists the flaky tests that failed. - find-flaky.py lists the flaky.txt entries that passed, or failed, in every run where they ran. --update is unchanged. - Both scripts read the lists first and stop if a list they read does not exist. compare-baseline.py --update may still create a baseline. - Update the known-failures header, the trx.py docstring, the run-suites.sh help, spec-tests.yml comments and CONTRIBUTING.md. Results ======= On three real runs, compare-baseline.py prints the same as before plus the new list. Both list files round-trip byte for byte.
Contributor
Author
|
Right now I'm assuming I'll actually have to fix something to make a flaky test stop flaking, so the commit that does that can change the flaky.txt. But... probably this needs a re-think at some point. |
Contributor
Author
|
Thanks @emilienbev. On the two points in your review:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue in brief: the nightly spec run on
mainhas failed since 2026-11-21 with no code change. Some spec tests pass in one run and fail in the next.known-failures.txtis taken from one run, so a flaky test that passed in that run is removed, and the nightly fails when it fails again.Across four runs of the same code (the run #189's baseline came from, and the nightlies of 11-21, 11-22 and 11-23), 45 tests both passed and failed. 7 of them were not in
known-failures.txt, and these are exactly the nightly's new failures. Most are in GraphUpdates (23), Transaction (10), TPC GearsOfWar (3) and ManyToManyTracking (3).Change
flaky.txtlists tests that may pass or fail.compare-baseline.pyignores their outcome, and--updatenever writes them toknown-failures.txt.scripts/find-flaky.py --runs <dir> <dir> ...finds the tests that both passed and failed across several runs of the same code (one downloaded CI run per directory);--updatemoves them toflaky.txt.flaky.txt: the 45 tests (38 of them leaveknown-failures.txt), less the 32 that CBEF-132: Count through the index when a query needs consistency #195 (CBEF-132) fixed: the 22 overlapping GraphUpdates and 10 Transaction tests were flaky because an unfilteredCOUNT(*)ignoredRequestPlus. 13 tests remain.known-failures.txt: 49 entries that passed in all four runs leave. They had been kept by hand as flaky, but on this code they pass every time.spec-tests.ymlheader describeflaky.txt.Tests
All four runs, including the three failed nightlies, compared with the 45-test list: no failures outside it. After the rebase onto #195, the full spec run with that fix (45306660214) compared with the 13-test list: no failures outside it, and all 32 removed tests passed there and in the filtered run 45425994911. Why the remaining 13 are flaky will be looked at separately.
Jira: CBEF-123
🤖 Generated with Claude Code