fix(e2e): stabilize ObsessionDB live e2e flakes on main - #220
Closed
vesperships wants to merge 1 commit into
Closed
vesperships wants to merge 1 commit into
vesperships wants to merge 1 commit into
Conversation
Unblock the obsessiondb CI job (run 36370187217 on 7fe44e5) which failed: - plugin-ingest: journal UNKNOWN_TABLE after CREATE (SharedMergeTree lag) - plugin-backfill mv_replay: target missing early buckets after QueryFinish - cli migrate-dictionary: dictGet empty after seed (stale initial load) - cli text-index: suite 15s timeout vs 20–30s sibling ObsessionDB latency Root causes (recurring across prior main runs; not introduced by #219): 1. createClickHouseJournal.ensure() did not wait for table visibility 2. Dictionary HTTP source races initial load vs post-create INSERT 3. mv_replay assert did not poll for SharedMergeTree insert visibility 4. Two text-index tests inherited 15s suite timeout without overrides Fixes: waitForTable after journal CREATE; SYSTEM RELOAD DICTIONARY + waitForRows after seed/replace; waitForRows for mv_replay buckets; 120s/60s timeouts on the two text-index tests. Cannot verify live ObsessionDB here (no secrets). Unit/typecheck/lint OK. Related: #218 batches the escape-check queries (complementary).
vesperships
pushed a commit
that referenced
this pull request
Sep 28, 2026
…220) (#221) * test(clickhouse): add pollUntil e2e helper that preserves assertion diffs Co-authored-by: Marc Höffl <marc.hoeffl@gmail.com> * fix(plugin-ingest): tolerate replica lag and slow terminal journal writes - ensure() waits for the journal table after CREATE - run_started/run_finished get the same bounded retry as stream facts - terminal facts are bounded by the live run's deadline, with the fixed 5s grace only after interruption; a slow run_finished insert no longer turns a successful run into a TimeoutError Co-authored-by: Marc Höffl <marc.hoeffl@gmail.com> * test(plugin-ingest): create the live journal during setup and bound hooks Co-authored-by: Marc Höffl <marc.hoeffl@gmail.com> * test(cli): reload the dictionary on every poll and read its source consistently Co-authored-by: Marc Höffl <marc.hoeffl@gmail.com> * test(plugin-backfill): consistent mv_replay chunk reads and polled target check Co-authored-by: Marc Höffl <marc.hoeffl@gmail.com> * test(cli): batch text-index remote checks into single queries Co-authored-by: Marc Höffl <marc.hoeffl@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Collaborator
Author
|
Superseded by #221 (merged). Closing unmerged. |
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.
Summary
Unblocks the red obsessiondb job on main HEAD
7fe44e5(CI run 36370187217, jobobsessiondb).Turbo only reported
@chkit/plugin-ingest#testas Failed; the same job log also shows failures in plugin-backfill mv-replay, migrate-dictionary, and text-index (suite continues after turbo’s first failure).Not a #219 regression. Prior main obsessiondb fails on
fedbf56/3cc768d/256ec62already hit ingest timeouts and the text-index 15s timeout; mv_replay passed on those SHAs and failed once here with partial visibility. #219 only retargetedsystemTableSource/ async polling away from hardcodedclusterAllReplicas('cluster', …).Failures → root cause → fix
plugin-ingestlive:UNKNOWN_TABLE…_journal(code 60); BigInt in same file passedcreateClickHouseJournal.ensure()CREATE TABLEwithout waiting for SharedMergeTree visibility; next append/read can hit another replicawaitForTableafter CREATE inensure()waitForTable’d inbeforeAll); prior runs failed the same suite with TimeoutError / UNKNOWN_TABLE variantsmv-replay-plan.e2e: actual missing buckets 0–1 aftercompleted === 4QueryFinish; partial target visibility on managed CHwaitForRowsuntilBUCKETSrows, thentoEqual(expected)waitForRowspattern; if data is permanently missing this will time out instead of masking a planner bugmigrate-dictionary.e2e:dictGetExpected"Alice"Received""INSERTSYSTEM RELOAD DICTIONARY+waitForRowsuntil Alice (after seed and after replace)text-index.e2e: two tests timeout at exactly 15000msbun test … --timeout 15000; siblings use 60–120s and often take 20–30s on ObsessionDBFiles changed
packages/plugin-ingest/src/journal.ts— product: wait for journal table visibility after ensurepackages/cli/src/test/migrate-dictionary.e2e.test.ts— harness: reload + poll dictGetpackages/plugin-backfill/src/mv-replay-plan.e2e.test.ts— harness: poll target bucketspackages/cli/src/test/text-index.e2e.test.ts— harness: raise specific timeoutsHow tested
bunx turbo run typecheck lint --filter=@chkit/plugin-ingest --filter=@chkit/plugin-backfill --filter=chkit --filter=@chkit/clickhouse— passbun testunit (no live CH): plugin-ingest executor/api/retry (54 pass); plugin-backfill async-backfill/planner/options (47 pass); sample cli unit (7 pass)obsessiondbjob is the verification.Out of scope / needs-human
ensure()wait is a real correctness fix for managed CH, not a sleep paper-over.