Skip to content

Normalize relation order in "are not colocated" detail to fix flaky mixed-version tests#8605

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-regression-tests-flakiness
Draft

Normalize relation order in "are not colocated" detail to fix flaky mixed-version tests#8605
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-regression-tests-flakiness

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

DESCRIPTION: Normalize relation order in "not colocated" error detail

Mixed-version (N/N‑1) regression runs intermittently diff only on the order of relation names in the colocation error detail:

-DETAIL:  events_test_table_2 and users_test_table are not colocated
+DETAIL:  users_test_table and events_test_table_2 are not colocated

Why 5a71f0d (#8319) didn't fix it

That commit sorts the two names in C (ErrorIfUnsupportedShardDistribution), which is correct for single-version runs. But the failing run comes from #8431's mixed-version testing, where the planner emitting the error may run an older Citus library that predates the sort and still prints names in nondeterministic order. The C-level fix can't affect output produced by an older library.

Change

  • Add a version-independent rule to src/test/regress/bin/normalize.sed canonicalizing the two relation names in the DETAIL: X and Y are not colocated line to placeholders, so both orderings (old and new library) compare equal:
s/^DETAIL:  [a-zA-Z0-9_]+ and [a-zA-Z0-9_]+ are not colocated$/DETAIL:  <relation> and <relation> are not colocated/

Scoped to this message only — leaves the shard-level Shard N of X and shard M of Y are not colocated. and the foreign-key relations are not colocated or not referencing... messages untouched. No production code or expected .out files change.

Copilot AI changed the title [WIP] Fix nondeterministic ordering in DETAIL output for regression tests Normalize relation order in "are not colocated" detail to fix flaky mixed-version tests Jun 1, 2026
Copilot AI requested a review from ihalatci June 1, 2026 18:59
@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.73%. Comparing base (f31fe24) to head (6540f03).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8605      +/-   ##
==========================================
+ Coverage   87.99%   88.73%   +0.73%     
==========================================
  Files         288      288              
  Lines       64382    64385       +3     
  Branches     8108     8109       +1     
==========================================
+ Hits        56650    57129     +479     
+ Misses       5381     4912     -469     
+ Partials     2351     2344       -7     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Run ci/normalize_expected.sh so the committed expected .out files match the
new normalize.sed rule that collapses the two relation names in the
"DETAIL:  X and Y are not colocated" message to <relation> placeholders.
Fixes the failing check-style step (ci/normalize_expected.sh && git diff
--exit-code).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression tests: nondeterministic ordering of relation names in DETAIL output causes spurious diffs

3 participants