Skip to content

test: isolate cyclic foreign key regression - #27647

Merged
XuPeng-SH merged 6 commits into
matrixorigin:mainfrom
ck89119:issue-27642-main
Aug 26, 2026
Merged

XuPeng-SH merged 6 commits into
matrixorigin:mainfrom
ck89119:issue-27642-main

Conversation

@ck89119

@ck89119 ck89119 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #27642

What this PR does / why we need it:

The cyclic-foreign-key data branch regression used the package-wide shared embedded cluster. Under CI resource stalls, that test could time out during cleanup and leave its intentionally cyclic database in the shared fixture. Later account/cluster restore tests then observed that leaked graph and failed with There is a cycle in dependency graph, producing a misleading restore failure cascade.

Move the destructive cyclic-FK regression into the isolated test package and give it a dedicated single-CN cluster. The cluster is closed by the test, so its cyclic catalog state and any failure cannot contaminate the shared fixture used by subsequent restore tests. The test assertions and public SQL coverage remain unchanged.

Validation:

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH 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.

Deep-reviewed exact HEAD ec160615e4903cf8368839d65e1e538a834d362e.

APPROVE.

This is a sound test-isolation change:

  • no production path changes;
  • the cyclic-FK branch regression keeps its original success, failure, catalog, data, and FK-enforcement oracles;
  • the dedicated single-CN cluster is registered for cleanup even after partial startup, SQL cleanup runs before cluster teardown, and any failed cleanup remains confined to the isolated package process instead of contaminating the shared restore fixture;
  • extracting waitSystemBootstrap preserves the existing #26114 startup gate;
  • package/test selection still executes the moved regression.

Exact-head evidence is sufficient: git diff --check is clean; CI ran TestIssue26111DataBranchDatabaseWithCyclicForeignKeys in 43.92s and TestIssue26114CrossAccountBranchQuotaAndOwnership in 59.83s, both passed; the shared pkg/tests/issues package and the complete Ubuntu UT job also passed.

Scope note: this fixes the shared-fixture contamination and misleading restore-failure cascade described by #27642; it intentionally does not change production restore dependency sorting.

@XuPeng-SH
XuPeng-SH merged commit a560c6e into matrixorigin:main Aug 26, 2026
15 of 18 checks passed
@ck89119
ck89119 deleted the issue-27642-main branch August 26, 2026 14:53
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue matrixorigin#27642

## What this PR does / why we need it:

The cyclic-foreign-key data branch regression used the package-wide
shared embedded cluster. Under CI resource stalls, that test could time
out during cleanup and leave its intentionally cyclic database in the
shared fixture. Later account/cluster restore tests then observed that
leaked graph and failed with `There is a cycle in dependency graph`,
producing a misleading restore failure cascade.

Move the destructive cyclic-FK regression into the isolated test package
and give it a dedicated single-CN cluster. The cluster is closed by the
test, so its cyclic catalog state and any failure cannot contaminate the
shared fixture used by subsequent restore tests. The test assertions and
public SQL coverage remain unchanged.

Validation:

- `mo-cgo-test -count=1 -timeout=900s ./pkg/tests/issues/isolated`
- `mo-cgo-test -count=1 -timeout=1800s ./pkg/tests/issues`
- Exact issue regression selection for matrixorigin#26111, matrixorigin#26121, and matrixorigin#26640

---------

Co-authored-by: XuPeng-SH <[email protected]>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue matrixorigin#27642

## What this PR does / why we need it:

The cyclic-foreign-key data branch regression used the package-wide
shared embedded cluster. Under CI resource stalls, that test could time
out during cleanup and leave its intentionally cyclic database in the
shared fixture. Later account/cluster restore tests then observed that
leaked graph and failed with `There is a cycle in dependency graph`,
producing a misleading restore failure cascade.

Move the destructive cyclic-FK regression into the isolated test package
and give it a dedicated single-CN cluster. The cluster is closed by the
test, so its cyclic catalog state and any failure cannot contaminate the
shared fixture used by subsequent restore tests. The test assertions and
public SQL coverage remain unchanged.

Validation:

- `mo-cgo-test -count=1 -timeout=900s ./pkg/tests/issues/isolated`
- `mo-cgo-test -count=1 -timeout=1800s ./pkg/tests/issues`
- Exact issue regression selection for matrixorigin#26111, matrixorigin#26121, and matrixorigin#26640

---------

Co-authored-by: XuPeng-SH <[email protected]>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue matrixorigin#27642

## What this PR does / why we need it:

The cyclic-foreign-key data branch regression used the package-wide
shared embedded cluster. Under CI resource stalls, that test could time
out during cleanup and leave its intentionally cyclic database in the
shared fixture. Later account/cluster restore tests then observed that
leaked graph and failed with `There is a cycle in dependency graph`,
producing a misleading restore failure cascade.

Move the destructive cyclic-FK regression into the isolated test package
and give it a dedicated single-CN cluster. The cluster is closed by the
test, so its cyclic catalog state and any failure cannot contaminate the
shared fixture used by subsequent restore tests. The test assertions and
public SQL coverage remain unchanged.

Validation:

- `mo-cgo-test -count=1 -timeout=900s ./pkg/tests/issues/isolated`
- `mo-cgo-test -count=1 -timeout=1800s ./pkg/tests/issues`
- Exact issue regression selection for matrixorigin#26111, matrixorigin#26121, and matrixorigin#26640

---------

Co-authored-by: XuPeng-SH <[email protected]>

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants