Repository navigation
test: isolate cyclic foreign key regression - #27647
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
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
waitSystemBootstrappreserves 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.
## 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]>
## 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]>
## 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]>
What type of PR is this?
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:
mo-cgo-test -count=1 -timeout=900s ./pkg/tests/issues/isolatedmo-cgo-test -count=1 -timeout=1800s ./pkg/tests/issues