From 0aa1fb9d7e3967ca84126b63e8b0e450d026c33d Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Mon, 24 Aug 2026 15:55:05 +0800 Subject: [PATCH] fix(ci): copy connection-types in docker image and align auto-commit tests --- .../src/stores/__tests__/queryStore.hiddenPrimaryKey.spec.ts | 4 ++++ .../__tests__/queryStore.manualTransactionExpiry.spec.ts | 2 ++ deploy/Dockerfile | 4 ++++ packages/app-tests/queryStore.test.ts | 4 ++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/stores/__tests__/queryStore.hiddenPrimaryKey.spec.ts b/apps/desktop/src/stores/__tests__/queryStore.hiddenPrimaryKey.spec.ts index abdc3d44d6..8e8f58424f 100644 --- a/apps/desktop/src/stores/__tests__/queryStore.hiddenPrimaryKey.spec.ts +++ b/apps/desktop/src/stores/__tests__/queryStore.hiddenPrimaryKey.spec.ts @@ -794,6 +794,8 @@ describe("queryStore hidden primary key editing", () => { const { useQueryStore } = await import("@/stores/queryStore"); const store = useQueryStore(); const tabId = store.createTab("oracle-1", "ORCL", "Query"); + // Tabs default to auto-commit; exercise the explicit manual-transaction path. + store.setAutoCommit(tabId, false); const execution = store.executeTabSql(tabId, "SELECT t.* FROM APP.WIDE_TABLE t"); await vi.waitFor(() => expect(listIndexes).toHaveBeenCalled()); @@ -830,6 +832,8 @@ describe("queryStore hidden primary key editing", () => { const { useQueryStore } = await import("@/stores/queryStore"); const store = useQueryStore(); const tabId = store.createTab("oracle-1", "ORCL", "Query"); + // Tabs default to auto-commit; exercise the explicit manual-transaction path. + store.setAutoCommit(tabId, false); const execution = store.executeTabSql(tabId, "SELECT t.* FROM APP.WIDE_TABLE t"); await vi.waitFor(() => expect(listIndexes).toHaveBeenCalled()); diff --git a/apps/desktop/src/stores/__tests__/queryStore.manualTransactionExpiry.spec.ts b/apps/desktop/src/stores/__tests__/queryStore.manualTransactionExpiry.spec.ts index 8169d7cc74..eabce2e942 100644 --- a/apps/desktop/src/stores/__tests__/queryStore.manualTransactionExpiry.spec.ts +++ b/apps/desktop/src/stores/__tests__/queryStore.manualTransactionExpiry.spec.ts @@ -102,6 +102,8 @@ describe("queryStore manual transaction expiry recovery", () => { const { useQueryStore } = await import("@/stores/queryStore"); const store = useQueryStore(); const tabId = store.createTab("oracle-1", "ORCL", "Query", "query", "APP"); + // Tabs default to auto-commit; the expiry recovery path only applies to manual transactions. + store.setAutoCommit(tabId, false); await store.executeTabSql(tabId, "UPDATE USERS SET ACTIVE = 1"); await store.executeTabSql(tabId, "UPDATE USERS SET ACTIVE = 1"); diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 3125d3e0f0..8b7b8ce3b6 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -64,7 +64,11 @@ RUN case "$TARGETARCH" in \ # Copy real sources and rebuild (only application code recompiles) COPY crates/ crates/ +# dbx-core's build.rs embeds plugins/dialects (SQL dialects) and +# plugins/connection-types (database manifest + DatabaseType enum); +# either directory missing makes the build script panic. COPY plugins/dialects/ plugins/dialects/ +COPY plugins/connection-types/ plugins/connection-types/ # Docker COPY preserves original file timestamps, which may be older than the # dummy-source binary compiled above. Touch all .rs files so cargo detects the diff --git a/packages/app-tests/queryStore.test.ts b/packages/app-tests/queryStore.test.ts index 0d3e2e01d6..dcb2b6dbd8 100644 --- a/packages/app-tests/queryStore.test.ts +++ b/packages/app-tests/queryStore.test.ts @@ -296,7 +296,7 @@ test("external SQL file paths persist with open query tabs", async () => { } }); -test("legacy Oracle query tabs restore with the manual transaction default", async () => { +test("legacy Oracle query tabs restore with the auto-commit default", async () => { const restoreStorage = installMemoryStorage(); try { setActivePinia(createPinia()); @@ -317,7 +317,7 @@ test("legacy Oracle query tabs restore with the manual transaction default", asy store = useQueryStore(); await store.initOpenTabs(); - assert.equal(store.tabs.find((tab) => tab.id === tabId)?.autoCommit, false); + assert.equal(store.tabs.find((tab) => tab.id === tabId)?.autoCommit, true); } finally { restoreStorage(); }