Repository navigation
fix: schema dump integration cleanup and webui npm audit - #80
Merged
Merged
Conversation
- Use a fresh DB connection and non-cancelled context in t.Cleanup so DROP runs after defer conn.Close and after the test context expires. - Remove stale xsql_schema_* artifacts at test start; scope PG ListTables assertions to the test schema for leftover tolerance. - npm audit fix for devalue, nanoid, and source-map-js (supersedes #74). Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #80 +/- ##
==========================================
+ Coverage 82.65% 82.69% +0.03%
==========================================
Files 65 65
Lines 6349 6349
==========================================
+ Hits 5248 5250 +2
+ Misses 824 823 -1
+ Partials 277 276 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
zx06
marked this pull request as ready for review
October 10, 2026 05:11
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
Fixes two maintenance items: integration test resource leaks in schema dump tests, and three high-severity npm audit findings in
webui/.1. Schema dump integration test cleanup
Root cause:
t.Cleanupused the test’s 20s timeout context and the same*sql.DBthatdefer conn.Close()already closed. Cleanup runs after defers, soDROPfailed silently and leftxsql_schema_*MySQL tables / PostgreSQL schemas behind. A second run then failedTestSchemaDump_Pg_RealDBat theListTablesassertion because thexsql_*pattern matched tables in leftover schemas.Fix:
t.Cleanup.xsql_schema_*artifacts at test start (from prior failed cleanups).ListTablesassertion counts only tables in the current test schema so unrelated leftovers do not fail the test.Verified locally against MySQL 8.0 and PostgreSQL 16 (Docker): full integration suite run twice in a row, zero
xsql_schema_*leftovers afterward.2. webui npm audit
Ran
npm audit fixinwebui/to resolve high-severity issues in transitive deps: devalue, nanoid, source-map-js.npm auditnow reports 0 high vulnerabilities. This supersedes open Dependabot PR #74 (devalue bump).Verification
npm audit(webui): 0 highnpm run build(webui)go build ./...go vet ./...go test ./...go test -tags=e2e ./tests/e2e/...go test -tags=integration ./tests/integration/...(×2)golangci-lint run ./...中文摘要
t.Cleanup中使用了已取消的测试 context 和已被defer关闭的连接,导致DROP未执行、数据库残留xsql_schema_*对象;第二次运行 PG 测试会在ListTables处失败。现已改为 cleanup 使用独立连接与 context,并在测试开始时清理历史残留;PG 断言限定在当前 schema。npm audit fix修复 devalue / nanoid / source-map-js 三个高危漏洞,替代 Dependabot PR chore(deps): bump devalue from 5.8.1 to 5.9.4 in /webui #74。