prostgles-server 4.2.647 → 4.2.648
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +1 -1
- package/debug/inspect-ui-sync.cjs +24 -0
- package/debug/subscription-cleanup-repro.log +662 -0
- package/debug/subscription-cleanup-trace.log +7230 -0
- package/debug/sync-bigint-DBGeneratedSchema.backup +489 -0
- package/debug/sync-bigint-build.log +4 -0
- package/debug/sync-bigint-client-build.log +0 -0
- package/debug/sync-bigint-lint.log +4 -0
- package/debug/sync-bigint-server-build.log +0 -0
- package/debug/sync-comment-DBGeneratedSchema.backup +489 -0
- package/debug/sync-delay-gate-DBGeneratedSchema.backup +489 -0
- package/debug/sync-delay-gate-build.log +0 -0
- package/debug/sync-diff-review-test.log +132 -0
- package/debug/sync-followup-build.log +4 -0
- package/debug/sync-notification-before.log +121 -0
- package/debug/sync-trigger-cleanup-before.log +134 -0
- package/debug/sync-trigger-fix-e2e.log +1758 -0
- package/debug/sync-trigger-fix-npm-test.log +1815 -0
- package/debug/sync-trigger-lint.log +4 -0
- package/debug/trace-subscription-cleanup.cjs +19 -0
- package/debug/ui-sync-database-snapshot.log +8 -0
- package/debug/ui-sync-investigation.md +30 -0
- package/debug/ui-sync-server-tests.log +553 -0
- package/dist/PubSubManager/PubSubManager.d.ts +8 -25
- package/dist/PubSubManager/PubSubManager.d.ts.map +1 -1
- package/dist/PubSubManager/PubSubManager.js +27 -23
- package/dist/PubSubManager/PubSubManager.js.map +1 -1
- package/dist/PubSubManager/deleteOrphanedTriggers.d.ts.map +1 -1
- package/dist/PubSubManager/deleteOrphanedTriggers.js +5 -3
- package/dist/PubSubManager/deleteOrphanedTriggers.js.map +1 -1
- package/dist/PubSubManager/init/getDataWatchFunctionQuery.d.ts.map +1 -1
- package/dist/PubSubManager/init/getDataWatchFunctionQuery.js +1 -2
- package/dist/PubSubManager/init/getDataWatchFunctionQuery.js.map +1 -1
- package/dist/PubSubManager/init/getPubSubManagerInitQuery.d.ts.map +1 -1
- package/dist/PubSubManager/init/getPubSubManagerInitQuery.js +3 -2
- package/dist/PubSubManager/init/getPubSubManagerInitQuery.js.map +1 -1
- package/dist/PubSubManager/notifListener.js +2 -2
- package/dist/PubSubManager/notifListener.js.map +1 -1
- package/dist/PubSubManager/refreshTriggers.d.ts.map +1 -1
- package/dist/PubSubManager/refreshTriggers.js +5 -3
- package/dist/PubSubManager/refreshTriggers.js.map +1 -1
- package/lib/PubSubManager/PubSubManager.ts +31 -28
- package/lib/PubSubManager/deleteOrphanedTriggers.ts +5 -3
- package/lib/PubSubManager/init/getDataWatchFunctionQuery.ts +1 -2
- package/lib/PubSubManager/init/getPubSubManagerInitQuery.ts +3 -2
- package/lib/PubSubManager/notifListener.ts +2 -2
- package/lib/PubSubManager/refreshTriggers.ts +7 -5
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { appendFileSync } = require('node:fs');
|
|
2
|
+
const server = require('../dist/index.js');
|
|
3
|
+
const original = server.default;
|
|
4
|
+
const trace = (event) => appendFileSync('/home/s/prostgles-server-js/debug/subscription-cleanup-trace.log', JSON.stringify({ time: Date.now(), ...event }) + '\n');
|
|
5
|
+
server.default = (options) => original({
|
|
6
|
+
...options,
|
|
7
|
+
onQuery: (error, ctx) => {
|
|
8
|
+
const query = typeof ctx.query === 'string' ? ctx.query : '';
|
|
9
|
+
if (query.includes('Delete removed subscriptions') || query.includes('UPDATE various')) trace({ query, error });
|
|
10
|
+
options.onQuery?.(error, ctx);
|
|
11
|
+
},
|
|
12
|
+
onLog: (event) => {
|
|
13
|
+
if (event.type === 'syncOrSub' && (event.tableName === 'various' || event.command === 'refreshTriggers')) {
|
|
14
|
+
trace({ command: event.command, condition: event.condition, dataArr: event.dataArr, state: event.state,
|
|
15
|
+
triggers: [...(event.triggers?.get('various') ?? [])], oldTriggers: [...(event.oldTriggers?.get('various') ?? [])] });
|
|
16
|
+
}
|
|
17
|
+
return options.onLog?.(event);
|
|
18
|
+
},
|
|
19
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
[]
|
|
2
|
+
[{"current_database":"db","now":"2026-09-29 20:20:25.342625+03","current_setting":"Europe/Bucharest","windows":"windows"}]
|
|
3
|
+
[{"application_name":"prostgles 9036ac03-2b76-4739-a2e5-c61037aeca63 ","backend_start":"2026-09-29 18:34:07.105567+03","state":"idle"},{"application_name":"prostgles 09028659-fbb9-4d8a-b708-c9c39792aa41 ","backend_start":"2026-09-29 18:36:24.487247+03","state":"idle"},{"application_name":"prostgles 95090789-ff35-4966-b2f7-698ae1605905 ","backend_start":"2026-09-29 18:39:40.798926+03","state":"idle"},{"application_name":"prostgles 9bde726e-d158-4493-bd01-35e6dd99ee66 ","backend_start":"2026-09-29 19:01:46.894268+03","state":"idle"},{"application_name":"prostgles d1cbd6cf-fccc-4682-b545-a7ff247dd1a0 ","backend_start":"2026-09-29 19:02:50.271704+03","state":"idle"}]
|
|
4
|
+
[{"id":"9036ac03-2b76-4739-a2e5-c61037aeca63","added":"2026-09-29T17:34:07.095Z","application_name":"prostgles 9036ac03-2b76-4739-a2e5-c61037aeca63 ","triggers":"41"}]
|
|
5
|
+
[{"tgname":"prostgles_triggers_windows_insert","tgenabled":"O"},{"tgname":"prostgles_triggers_windows_update","tgenabled":"O"},{"tgname":"prostgles_triggers_windows_delete","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_a_51697462","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_a_51697463","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_a_51697467","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_a_51697468","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_a_51697687","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_a_51697688","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_c_51697689","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_c_51697690","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_c_51697694","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_c_51697695","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_c_51697699","tgenabled":"O"},{"tgname":"RI_ConstraintTrigger_c_51697700","tgenabled":"O"}]
|
|
6
|
+
[{"app_id":"9036ac03-2b76-4739-a2e5-c61037aeca63","condition":" ( EXISTS ( \nSELECT 1\nFROM workspaces \"jd_0_workspaces\"\nWHERE (windows.\"workspace_id\" = \"jd_0_workspaces\".\"id\") AND (\"jd_0_workspaces\".\"published\" = true) \n) OR \"user_id\" = '3474a4f4-6afb-4039-83d4-6a4acfec39ac' ) AND \"workspace_id\" = '41f02b94-8867-4635-bc22-c21390d40f51'","inserted":"2026-09-29T18:22:28.897Z"}]
|
|
7
|
+
[{"id":"a5a6e910-2614-462c-88c9-6c95c68b085e","user_id":"3474a4f4-6afb-4039-83d4-6a4acfec39ac","workspace_id":"e258aa19-37f7-4084-a17b-9e6d2a77c127","name":"Users","last_updated":"1790699198563"},{"id":"b0b8dd49-5143-465f-b29f-6ffa33c5fea6","user_id":"3474a4f4-6afb-4039-83d4-6a4acfec39ac","workspace_id":"e258aa19-37f7-4084-a17b-9e6d2a77c127","name":"Stats","last_updated":"1790699196065"}]
|
|
8
|
+
[{"version":"4.2.647","added_at":"2026-09-29 18:34:07.038671"}]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UI sync investigation
|
|
2
|
+
|
|
3
|
+
Read-only inspection of the UI database and bounded, filtered sections of the application logs. No tracked source changes.
|
|
4
|
+
|
|
5
|
+
## Confirmed evidence
|
|
6
|
+
|
|
7
|
+
- The failed `Users` insert committed: its stored ID is `a5a6e910-2614-462c-88c9-6c95c68b085e`, workspace `e258aa19-37f7-4084-a17b-9e6d2a77c127`, user `3474a4f4-6afb-4039-83d4-6a4acfec39ac`. Its `last_updated` matches the failing insert. [Database snapshot](./ui-sync-database-snapshot.log:7)
|
|
8
|
+
- All three physical `windows` triggers are currently enabled. Only workspace `41f02b94-8867-4635-bc22-c21390d40f51` has a remaining `windows` registration. The failed workspace has none. These are post-failure observations, not a snapshot taken at the insert. [Database snapshot](./ui-sync-database-snapshot.log:5)
|
|
9
|
+
- The surviving notification connection started at 15:34:07 UTC, before the failing run. PostgreSQL uses Europe/Bucharest; timestamp-without-time-zone values parsed by Node must not be interpreted as UTC start times. [Connection start](./ui-sync-database-snapshot.log:3)
|
|
10
|
+
- At 16:26:34 the server still held both workspace syncs in memory, and notifications worked for the other workspace. [Log](/home/s/ui/e2e/.test-artifacts/latest-app-logs.log:116)
|
|
11
|
+
- The inserted row's user and workspace satisfy the missing registration's logged condition. A wrong user/workspace filter is therefore a weaker explanation than registration loss.
|
|
12
|
+
|
|
13
|
+
## Strongest causal lead: cleanup racing sync registration
|
|
14
|
+
|
|
15
|
+
1. Unsubscribe schedules cleanup at 16:22:40.618. [Log](/home/s/ui/e2e/.test-artifacts/latest-app-logs.2.log:244)
|
|
16
|
+
2. Cleanup runs after one second. [Timer](/home/s/prostgles-server-js/lib/PubSubManager/PubSubManager.ts:457)
|
|
17
|
+
3. The failed workspace's trigger and sync finish registration at 16:22:41.627. [Log](/home/s/ui/e2e/.test-artifacts/latest-app-logs.2.log:322)
|
|
18
|
+
4. A registration DELETE notification arrives at 16:22:41.638. [Log](/home/s/ui/e2e/.test-artifacts/latest-app-logs.2.log:338)
|
|
19
|
+
|
|
20
|
+
`addSync` awaits database trigger creation and cache refresh before adding its sync to `this.syncs`. During that interval, cleanup can omit the new condition from its keep-list. Its DELETE is based on that earlier list and can remove a registration which has since become active. [Registration gap](/home/s/prostgles-server-js/lib/PubSubManager/addSync.ts:118), [cleanup snapshot and DELETE](/home/s/prostgles-server-js/lib/PubSubManager/deleteOrphanedTriggers.ts:4).
|
|
21
|
+
|
|
22
|
+
This interleaving is consistent with the observed timing, but the logs do not record DELETE predicates or returned rows, so they cannot prove which DELETE removed this registration.
|
|
23
|
+
|
|
24
|
+
`refreshTriggers` retains removed entries and shallow-copies its nested maps for `oldTriggers`. Consequently the persistent cached workspace entries do not prove PostgreSQL retained their registrations. Clearing this cache alone does not prevent the registration/cleanup race. [Cache update](/home/s/prostgles-server-js/lib/PubSubManager/refreshTriggers.ts:21)
|
|
25
|
+
|
|
26
|
+
## Recommended source-package work
|
|
27
|
+
|
|
28
|
+
Protect registrations still being established from cleanup, and prevent queued cleanup from using a stale keep-list against newly active registrations. Replace stale cache entries with the actual query result. Add a regression alongside existing sync coverage that overlaps unsubscribe cleanup with adding another filtered sync, then verifies a later insert reaches that sync.
|
|
29
|
+
|
|
30
|
+
For a decisive next failing-run trace, log cleanup's app ID, kept conditions, and `DELETE ... RETURNING table_name, condition_hash`; record raw database registrations in refresh logging rather than relying on the merged cache.
|
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
|
|
2
|
+
> server_tests@1.0.0 test-server
|
|
3
|
+
> TEST_TYPE=server node --trace-uncaught --test dist/server/index.js
|
|
4
|
+
|
|
5
|
+
Prostgles: SQL file executed successfuly /home/s/prostgles-server-js/tests/server/init.sql
|
|
6
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
7
|
+
Running queries: /* prostgles internal query that should be excluded from schema watch */
|
|
8
|
+
|
|
9
|
+
DROP TABLE IF EXISTS "lookup_col1" CASCADE;
|
|
10
|
+
CREATE TABLE IF NOT EXISTS "lookup_col1" (
|
|
11
|
+
id TEXT PRIMARY KEY
|
|
12
|
+
, "description" TEXT
|
|
13
|
+
);
|
|
14
|
+
INSERT INTO "lookup_col1" ("id", "description") VALUES ('a','desc') ON CONFLICT DO NOTHING;
|
|
15
|
+
INSERT INTO "lookup_col1" ("id", "description") VALUES ('b',null) ON CONFLICT DO NOTHING;
|
|
16
|
+
Running queries: /* prostgles internal query that should be excluded from schema watch */
|
|
17
|
+
|
|
18
|
+
CREATE TABLE "files" (
|
|
19
|
+
"id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
|
|
20
|
+
"storage_key" UUID UNIQUE ,
|
|
21
|
+
"extension" TEXT NOT NULL DEFAULT '' ,
|
|
22
|
+
"content_type" TEXT NOT NULL DEFAULT '' ,
|
|
23
|
+
"content_length" BIGINT NOT NULL DEFAULT 0 ,
|
|
24
|
+
"etag" TEXT NOT NULL DEFAULT '' ,
|
|
25
|
+
"original_name" TEXT NOT NULL ,
|
|
26
|
+
"original_last_modified" TIMESTAMPTZ ,
|
|
27
|
+
"description" TEXT ,
|
|
28
|
+
"url" TEXT NOT NULL DEFAULT '' ,
|
|
29
|
+
"cloud_url" TEXT ,
|
|
30
|
+
"signed_url" TEXT ,
|
|
31
|
+
"signed_url_expires" BIGINT ,
|
|
32
|
+
"added" TIMESTAMP NOT NULL DEFAULT NOW() ,
|
|
33
|
+
"updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
|
|
34
|
+
"deleted" TIMESTAMPTZ ,
|
|
35
|
+
"deleted_from_storage" TIMESTAMPTZ ,
|
|
36
|
+
"data" BYTEA NOT NULL CHECK (data = decode('01', 'hex')) ,
|
|
37
|
+
"version" INTEGER NOT NULL DEFAULT 1 ,
|
|
38
|
+
"metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files","column":"metadata"}' ))
|
|
39
|
+
);
|
|
40
|
+
CREATE TABLE "files_versions" (
|
|
41
|
+
"id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
|
|
42
|
+
"storage_key" UUID NOT NULL ,
|
|
43
|
+
"extension" TEXT NOT NULL DEFAULT '' ,
|
|
44
|
+
"content_type" TEXT NOT NULL DEFAULT '' ,
|
|
45
|
+
"content_length" BIGINT NOT NULL DEFAULT 0 ,
|
|
46
|
+
"etag" TEXT NOT NULL DEFAULT '' ,
|
|
47
|
+
"original_name" TEXT NOT NULL ,
|
|
48
|
+
"original_last_modified" TIMESTAMPTZ ,
|
|
49
|
+
"description" TEXT ,
|
|
50
|
+
"url" TEXT NOT NULL DEFAULT '' ,
|
|
51
|
+
"cloud_url" TEXT ,
|
|
52
|
+
"signed_url" TEXT ,
|
|
53
|
+
"signed_url_expires" BIGINT ,
|
|
54
|
+
"added" TIMESTAMP NOT NULL DEFAULT NOW() ,
|
|
55
|
+
"updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
|
|
56
|
+
"deleted" TIMESTAMPTZ ,
|
|
57
|
+
"deleted_from_storage" TIMESTAMPTZ ,
|
|
58
|
+
"file_id" UUID NOT NULL ,
|
|
59
|
+
"version" INTEGER NOT NULL ,
|
|
60
|
+
"created" TIMESTAMP NOT NULL DEFAULT NOW() ,
|
|
61
|
+
"metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files_versions","column":"metadata"}' ))
|
|
62
|
+
);
|
|
63
|
+
ALTER TABLE "files_versions" ADD CONSTRAINT "prostgles_file_version_e24fec525e76b3433749621f589d35d9" FOREIGN KEY (file_id) REFERENCES "files"(id) ON DELETE CASCADE;
|
|
64
|
+
CREATE UNIQUE INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" ON "files_versions" (file_id, version);
|
|
65
|
+
COMMENT ON INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" IS 'd4af15d064cae99adac0c1194199a9e3';
|
|
66
|
+
CREATE TABLE "users_public_info" (
|
|
67
|
+
"id" SERIAL PRIMARY KEY ,
|
|
68
|
+
"name" TEXT ,
|
|
69
|
+
"avatar" UUID REFERENCES files ON DELETE CASCADE ,
|
|
70
|
+
"sid" TEXT
|
|
71
|
+
);
|
|
72
|
+
DROP TABLE IF EXISTS "users";
|
|
73
|
+
CREATE TABLE "users" (
|
|
74
|
+
"id" SERIAL PRIMARY KEY ,
|
|
75
|
+
"email" TEXT NOT NULL ,
|
|
76
|
+
"status" TEXT NOT NULL CHECK("status" = 'active' OR "status" = 'disabled' OR "status" = 'pending'),
|
|
77
|
+
"type" TEXT NOT NULL ,
|
|
78
|
+
"preferences" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"showIntro":{"type":"boolean","optional":true},"theme":{"enum":["light","dark","auto"],"optional":true},"others":{"type":"any[]"}}}'::TEXT, "preferences", '{"table":"users","column":"preferences"}' ))
|
|
79
|
+
);
|
|
80
|
+
DROP TABLE IF EXISTS "tjson";
|
|
81
|
+
CREATE TABLE "tjson" (
|
|
82
|
+
"json" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"a":{"type":"boolean"},"arr":{"enum":["1","2","3"]},"arr1":{"enum":[1,2,3]},"arr2":{"type":"integer[]"},"arrStr":{"type":"string[]","optional":true,"nullable":true},"o":{"optional":true,"nullable":true,"oneOfType":[{"o1":"integer"},{"o2":"boolean"}]}}}'::TEXT, "json", '{"table":"tjson","column":"json"}' )),
|
|
83
|
+
"colOneOf" TEXT NOT NULL CHECK("colOneOf" = 'a' OR "colOneOf" = 'b' OR "colOneOf" = 'c'),
|
|
84
|
+
"status" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"oneOfType":[{"ok":{"type":"string"}},{"err":{"type":"string"}},{"loading":{"type":{"loaded":{"type":"number"},"total":{"type":"number"}}}}]}'::TEXT, "status", '{"table":"tjson","column":"status"}' )),
|
|
85
|
+
"jsonOneOf" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"oneOfType":[{"command":{"enum":["a"]}},{"command":{"enum":["b"]},"option":{"type":"integer[]"}}]}'::TEXT, "jsonOneOf", '{"table":"tjson","column":"jsonOneOf"}' )),
|
|
86
|
+
"table_config" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"referencedTables":{"optional":true,"arrayOfType":{"name":"string","minFiles":"number"}},"recType":{"nullable":true,"optional":true,"record":{"keysEnum":["a","b"],"values":{"type":{"bools":"boolean[]"}}}}}}'::TEXT, "table_config", '{"table":"tjson","column":"table_config"}' ))
|
|
87
|
+
);
|
|
88
|
+
Running queries: /* prostgles internal query that should be excluded from schema watch */
|
|
89
|
+
|
|
90
|
+
ALTER TABLE "uuid_text" ADD FOREIGN KEY (col1) REFERENCES lookup_col1(id);
|
|
91
|
+
ALTER TABLE "uuid_text" ADD FOREIGN KEY (col2) REFERENCES lookup_col1(id);
|
|
92
|
+
ALTER TABLE "uuid_text" ADD FOREIGN KEY (col3) REFERENCES lookup_col1(id);
|
|
93
|
+
DROP TABLE IF EXISTS "api_table";
|
|
94
|
+
CREATE TABLE "api_table" (
|
|
95
|
+
"id" SERIAL PRIMARY KEY
|
|
96
|
+
);
|
|
97
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
98
|
+
(server): prostgles onReady
|
|
99
|
+
▶ Server Only Queries
|
|
100
|
+
✔ column definition row types support SQL aliases, arrays and generated columns (11.835596ms)
|
|
101
|
+
✔ lookup types propagate through database references while preserving overrides (10.055687ms)
|
|
102
|
+
✔ lookup types follow FK chains by column and terminate cycles (134.920038ms)
|
|
103
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
104
|
+
Running queries: /* prostgles internal query that should be excluded from schema watch */
|
|
105
|
+
|
|
106
|
+
CREATE TABLE "files" (
|
|
107
|
+
"id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
|
|
108
|
+
"storage_key" UUID UNIQUE ,
|
|
109
|
+
"extension" TEXT NOT NULL DEFAULT '' ,
|
|
110
|
+
"content_type" TEXT NOT NULL DEFAULT '' ,
|
|
111
|
+
"content_length" BIGINT NOT NULL DEFAULT 0 ,
|
|
112
|
+
"etag" TEXT NOT NULL DEFAULT '' ,
|
|
113
|
+
"original_name" TEXT NOT NULL ,
|
|
114
|
+
"original_last_modified" TIMESTAMPTZ ,
|
|
115
|
+
"description" TEXT ,
|
|
116
|
+
"url" TEXT NOT NULL DEFAULT '' ,
|
|
117
|
+
"cloud_url" TEXT ,
|
|
118
|
+
"signed_url" TEXT ,
|
|
119
|
+
"signed_url_expires" BIGINT ,
|
|
120
|
+
"added" TIMESTAMP NOT NULL DEFAULT NOW() ,
|
|
121
|
+
"updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
|
|
122
|
+
"deleted" TIMESTAMPTZ ,
|
|
123
|
+
"deleted_from_storage" TIMESTAMPTZ ,
|
|
124
|
+
"data" BYTEA NOT NULL CHECK (data = decode('01', 'hex'))
|
|
125
|
+
);
|
|
126
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
127
|
+
Prostgles: Created typescript schema definition file:
|
|
128
|
+
DBGeneratedSchema.ts
|
|
129
|
+
Prostgles: Created typescript schema definition file:
|
|
130
|
+
DBGeneratedSchema.ts
|
|
131
|
+
▶ client publish profiles compile at startup and follow user types
|
|
132
|
+
✔ server user handlers enforce permissions and reject client impersonation (49.111794ms)
|
|
133
|
+
✔ a rejected guest abort cannot cancel a later server-user query (2.761445ms)
|
|
134
|
+
✔ caught subscription errors still roll back client transactions (4.992074ms)
|
|
135
|
+
✔ caught checkFilter errors still roll back client transactions (9.723124ms)
|
|
136
|
+
✔ caught postValidate errors still roll back client transactions (2.565173ms)
|
|
137
|
+
No options changed
|
|
138
|
+
Prostgles: Created typescript schema definition file:
|
|
139
|
+
DBGeneratedSchema.ts
|
|
140
|
+
Prostgles: Created typescript schema definition file:
|
|
141
|
+
DBGeneratedSchema.ts
|
|
142
|
+
Prostgles: Created typescript schema definition file:
|
|
143
|
+
DBGeneratedSchema.ts
|
|
144
|
+
Prostgles: Created typescript schema definition file:
|
|
145
|
+
DBGeneratedSchema.ts
|
|
146
|
+
destroying prgl instance
|
|
147
|
+
✔ server user handlers require configured authentication (0.756903ms)
|
|
148
|
+
✔ client publish profiles compile at startup and follow user types (2061.393257ms)
|
|
149
|
+
▶ Managed storage permission and transaction safety
|
|
150
|
+
✔ legacy ID-based files remain readable and replaceable (31.095846ms)
|
|
151
|
+
✔ custom columns do not require or interfere with file data (29.247918ms)
|
|
152
|
+
✔ filtered updates and failed validation preserve storage (11.688649ms)
|
|
153
|
+
✔ failed uploads and application hooks leave no replacement objects (29.139346ms)
|
|
154
|
+
✔ duplicate IDs, conflict updates and SQL-only requests cannot overwrite (23.189538ms)
|
|
155
|
+
✔ PostgreSQL update policies are enforced before uploading (13.621683ms)
|
|
156
|
+
✔ RLS-hidden references fail closed during storage cleanup (9.744694ms)
|
|
157
|
+
✔ beforeEach lifecycle callbacks follow the outer transaction (33.71602ms)
|
|
158
|
+
✔ outer rollback preserves replaced and deleted objects (25.482551ms)
|
|
159
|
+
✔ a failed multi-insert waits for other uploads before cleanup (5.574565ms)
|
|
160
|
+
✔ concurrent replacements leave one complete referenced object (28.777693ms)
|
|
161
|
+
✔ version retention removes only unreferenced objects (42.127458ms)
|
|
162
|
+
✔ foreign-key failure preserves bytes and deletion waits for commit (18.524384ms)
|
|
163
|
+
✔ cloud downloads and cleanup use the committed storage key (51.310836ms)
|
|
164
|
+
✔ Managed storage permission and transaction safety (377.336163ms)
|
|
165
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
166
|
+
destroying prgl instance
|
|
167
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
168
|
+
destroying prgl instance
|
|
169
|
+
✔ custom joins add conditions unless override is requested (2288.805154ms)
|
|
170
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
171
|
+
destroying prgl instance
|
|
172
|
+
✔ custom self joins use configured paths and override inferred joins (1152.58399ms)
|
|
173
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
174
|
+
destroying prgl instance
|
|
175
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
176
|
+
destroying prgl instance
|
|
177
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
178
|
+
destroying prgl instance
|
|
179
|
+
✔ destroy allows reusing Socket.IO on a running HTTP server (3343.014972ms)
|
|
180
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
181
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
182
|
+
Running queries: /* prostgles internal query that should be excluded from schema watch */
|
|
183
|
+
|
|
184
|
+
CREATE TABLE "audit_events" (
|
|
185
|
+
"id" BIGSERIAL PRIMARY KEY ,
|
|
186
|
+
"created_at" TIMESTAMPTZ NOT NULL DEFAULT clock_timestamp() ,
|
|
187
|
+
"schema_name" TEXT NOT NULL ,
|
|
188
|
+
"table_name" TEXT NOT NULL ,
|
|
189
|
+
"operation" TEXT NOT NULL CHECK("operation" = 'INSERT' OR "operation" = 'UPDATE' OR "operation" = 'DELETE'),
|
|
190
|
+
"old_id" JSONB ,
|
|
191
|
+
"new_id" JSONB ,
|
|
192
|
+
"old_row" JSONB ,
|
|
193
|
+
"new_row" JSONB ,
|
|
194
|
+
"actor" JSONB ,
|
|
195
|
+
"db_context" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"transaction_id":"string","transaction_started_at":"string","statement_started_at":"string","current_role":"string","session_user":"string","application_name":"string"}}'::TEXT, "db_context", '{"table":"audit_events","column":"db_context"}' ))
|
|
196
|
+
);
|
|
197
|
+
CREATE TABLE "audit_test_files" (
|
|
198
|
+
"id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
|
|
199
|
+
"storage_key" UUID UNIQUE ,
|
|
200
|
+
"extension" TEXT NOT NULL DEFAULT '' ,
|
|
201
|
+
"content_type" TEXT NOT NULL DEFAULT '' ,
|
|
202
|
+
"content_length" BIGINT NOT NULL DEFAULT 0 ,
|
|
203
|
+
"etag" TEXT NOT NULL DEFAULT '' ,
|
|
204
|
+
"original_name" TEXT NOT NULL ,
|
|
205
|
+
"original_last_modified" TIMESTAMPTZ ,
|
|
206
|
+
"description" TEXT ,
|
|
207
|
+
"url" TEXT NOT NULL DEFAULT '' ,
|
|
208
|
+
"cloud_url" TEXT ,
|
|
209
|
+
"signed_url" TEXT ,
|
|
210
|
+
"signed_url_expires" BIGINT ,
|
|
211
|
+
"added" TIMESTAMP NOT NULL DEFAULT NOW() ,
|
|
212
|
+
"updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
|
|
213
|
+
"deleted" TIMESTAMPTZ ,
|
|
214
|
+
"deleted_from_storage" TIMESTAMPTZ ,
|
|
215
|
+
"data" BYTEA NOT NULL CHECK (data = decode('01', 'hex'))
|
|
216
|
+
);
|
|
217
|
+
CREATE TABLE "audit_test_source" (
|
|
218
|
+
"a" int NOT NULL ,
|
|
219
|
+
"b" text NOT NULL ,
|
|
220
|
+
"value" text ,
|
|
221
|
+
"secret" text
|
|
222
|
+
);
|
|
223
|
+
ALTER TABLE "audit_test_source" ADD PRIMARY KEY (a, b);
|
|
224
|
+
CREATE TABLE "audit_test_documents" (
|
|
225
|
+
"id" serial PRIMARY KEY ,
|
|
226
|
+
"file_id" uuid NOT NULL REFERENCES audit_test_files(id)
|
|
227
|
+
);
|
|
228
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
229
|
+
IO missing. Publish has no effect without io or restApi
|
|
230
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
231
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
232
|
+
IO missing. Publish has no effect without io or restApi
|
|
233
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
234
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
235
|
+
IO missing. Publish has no effect without io or restApi
|
|
236
|
+
destroying prgl instance
|
|
237
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
238
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
239
|
+
IO missing. Publish has no effect without io or restApi
|
|
240
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
241
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
242
|
+
IO missing. Publish has no effect without io or restApi
|
|
243
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
244
|
+
Trace: Error: audit.tables cannot mix enabled and disabled entries
|
|
245
|
+
at parseAuditConfig (/home/s/prostgles-server-js/dist/Audit/parseAuditConfig.js:19:15)
|
|
246
|
+
at get resolvedAuditConfig (/home/s/prostgles-server-js/dist/Prostgles.js:135:56)
|
|
247
|
+
at get mergedTableConfig (/home/s/prostgles-server-js/dist/Prostgles.js:147:28)
|
|
248
|
+
at syncTableTriggers (/home/s/prostgles-server-js/dist/TableConfig/syncTableTriggers.js:8:25)
|
|
249
|
+
at /home/s/prostgles-server-js/dist/initProstgles.js:99:61
|
|
250
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
251
|
+
at Prostgles.initProstgles (/home/s/prostgles-server-js/dist/initProstgles.js:198:17)
|
|
252
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
253
|
+
at async waitForActual (node:assert:646:5)
|
|
254
|
+
at async strict.rejects (node:assert:769:25)
|
|
255
|
+
at async TestContext.<anonymous> (/home/s/prostgles-server-js/tests/server/dist/server/audit.spec.js:485:17)
|
|
256
|
+
at async Test.run (node:internal/test_runner/test:1125:7)
|
|
257
|
+
at async Suite.processPendingSubtests (node:internal/test_runner/test:787:7)
|
|
258
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
259
|
+
Trace: Error: Unknown audit table: missing_table
|
|
260
|
+
at parseAuditConfig (/home/s/prostgles-server-js/dist/Audit/parseAuditConfig.js:23:19)
|
|
261
|
+
at get resolvedAuditConfig (/home/s/prostgles-server-js/dist/Prostgles.js:135:56)
|
|
262
|
+
at get mergedTableConfig (/home/s/prostgles-server-js/dist/Prostgles.js:147:28)
|
|
263
|
+
at syncTableTriggers (/home/s/prostgles-server-js/dist/TableConfig/syncTableTriggers.js:8:25)
|
|
264
|
+
at /home/s/prostgles-server-js/dist/initProstgles.js:99:61
|
|
265
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
266
|
+
at Prostgles.initProstgles (/home/s/prostgles-server-js/dist/initProstgles.js:198:17)
|
|
267
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
268
|
+
at async waitForActual (node:assert:646:5)
|
|
269
|
+
at async strict.rejects (node:assert:769:25)
|
|
270
|
+
at async TestContext.<anonymous> (/home/s/prostgles-server-js/tests/server/dist/server/audit.spec.js:485:17)
|
|
271
|
+
at async Test.run (node:internal/test_runner/test:1125:7)
|
|
272
|
+
at async Suite.processPendingSubtests (node:internal/test_runner/test:787:7)
|
|
273
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
274
|
+
Trace: Error: audit.idColumns is required for audit_test_nopk without a primary key
|
|
275
|
+
at parseAuditConfig (/home/s/prostgles-server-js/dist/Audit/parseAuditConfig.js:45:19)
|
|
276
|
+
at get resolvedAuditConfig (/home/s/prostgles-server-js/dist/Prostgles.js:135:56)
|
|
277
|
+
at get mergedTableConfig (/home/s/prostgles-server-js/dist/Prostgles.js:147:28)
|
|
278
|
+
at syncTableTriggers (/home/s/prostgles-server-js/dist/TableConfig/syncTableTriggers.js:8:25)
|
|
279
|
+
at /home/s/prostgles-server-js/dist/initProstgles.js:99:61
|
|
280
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
281
|
+
at Prostgles.initProstgles (/home/s/prostgles-server-js/dist/initProstgles.js:198:17)
|
|
282
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
283
|
+
at async waitForActual (node:assert:646:5)
|
|
284
|
+
at async strict.rejects (node:assert:769:25)
|
|
285
|
+
at async TestContext.<anonymous> (/home/s/prostgles-server-js/tests/server/dist/server/audit.spec.js:485:17)
|
|
286
|
+
at async Test.run (node:internal/test_runner/test:1125:7)
|
|
287
|
+
at async Suite.processPendingSubtests (node:internal/test_runner/test:787:7)
|
|
288
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
289
|
+
Trace: Error: Unsupported audit target: audit_test_view
|
|
290
|
+
at parseAuditConfig (/home/s/prostgles-server-js/dist/Audit/parseAuditConfig.js:37:23)
|
|
291
|
+
at get resolvedAuditConfig (/home/s/prostgles-server-js/dist/Prostgles.js:135:56)
|
|
292
|
+
at get mergedTableConfig (/home/s/prostgles-server-js/dist/Prostgles.js:147:28)
|
|
293
|
+
at syncTableTriggers (/home/s/prostgles-server-js/dist/TableConfig/syncTableTriggers.js:8:25)
|
|
294
|
+
at /home/s/prostgles-server-js/dist/initProstgles.js:99:61
|
|
295
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
296
|
+
at Prostgles.initProstgles (/home/s/prostgles-server-js/dist/initProstgles.js:198:17)
|
|
297
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
298
|
+
at async waitForActual (node:assert:646:5)
|
|
299
|
+
at async strict.rejects (node:assert:769:25)
|
|
300
|
+
at async TestContext.<anonymous> (/home/s/prostgles-server-js/tests/server/dist/server/audit.spec.js:485:17)
|
|
301
|
+
at async Test.run (node:internal/test_runner/test:1125:7)
|
|
302
|
+
at async Suite.processPendingSubtests (node:internal/test_runner/test:787:7)
|
|
303
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
304
|
+
Trace: Error: Audit identity columns cannot be excluded: audit_test_source
|
|
305
|
+
at parseAuditConfig (/home/s/prostgles-server-js/dist/Audit/parseAuditConfig.js:54:19)
|
|
306
|
+
at get resolvedAuditConfig (/home/s/prostgles-server-js/dist/Prostgles.js:135:56)
|
|
307
|
+
at get mergedTableConfig (/home/s/prostgles-server-js/dist/Prostgles.js:147:28)
|
|
308
|
+
at syncTableTriggers (/home/s/prostgles-server-js/dist/TableConfig/syncTableTriggers.js:8:25)
|
|
309
|
+
at /home/s/prostgles-server-js/dist/initProstgles.js:99:61
|
|
310
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
311
|
+
at Prostgles.initProstgles (/home/s/prostgles-server-js/dist/initProstgles.js:198:17)
|
|
312
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
313
|
+
at async waitForActual (node:assert:646:5)
|
|
314
|
+
at async strict.rejects (node:assert:769:25)
|
|
315
|
+
at async TestContext.<anonymous> (/home/s/prostgles-server-js/tests/server/dist/server/audit.spec.js:485:17)
|
|
316
|
+
at async Test.run (node:internal/test_runner/test:1125:7)
|
|
317
|
+
at async Suite.processPendingSubtests (node:internal/test_runner/test:787:7)
|
|
318
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
319
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
320
|
+
IO missing. Publish has no effect without io or restApi
|
|
321
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
322
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
323
|
+
IO missing. Publish has no effect without io or restApi
|
|
324
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
325
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
326
|
+
IO missing. Publish has no effect without io or restApi
|
|
327
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
328
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
329
|
+
IO missing. Publish has no effect without io or restApi
|
|
330
|
+
Prostgles: SQL file executed successfuly /tmp/prostgles-audit-6zpyEQ/init.sql
|
|
331
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
332
|
+
IO missing. Publish has no effect without io or restApi
|
|
333
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
334
|
+
IO missing. Publish has no effect without io or restApi
|
|
335
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
336
|
+
IO missing. Publish has no effect without io or restApi
|
|
337
|
+
Trace: Error: audit.idColumns is required for audit_test_nopk without a primary key
|
|
338
|
+
at parseAuditConfig (/home/s/prostgles-server-js/dist/Audit/parseAuditConfig.js:45:19)
|
|
339
|
+
at get resolvedAuditConfig (/home/s/prostgles-server-js/dist/Prostgles.js:135:56)
|
|
340
|
+
at get mergedTableConfig (/home/s/prostgles-server-js/dist/Prostgles.js:147:28)
|
|
341
|
+
at syncTableTriggers (/home/s/prostgles-server-js/dist/TableConfig/syncTableTriggers.js:8:25)
|
|
342
|
+
at /home/s/prostgles-server-js/dist/initProstgles.js:99:61
|
|
343
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
344
|
+
at Prostgles.initProstgles (/home/s/prostgles-server-js/dist/initProstgles.js:198:17)
|
|
345
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
|
|
346
|
+
at async updateConfiguration (/home/s/prostgles-server-js/dist/updateConfiguration.js:58:9)
|
|
347
|
+
at async Object.update (/home/s/prostgles-server-js/dist/initProstgles.js:162:17)
|
|
348
|
+
at async waitForActual (node:assert:646:5)
|
|
349
|
+
at async strict.rejects (node:assert:769:25)
|
|
350
|
+
at async TestContext.<anonymous> (/home/s/prostgles-server-js/tests/server/dist/server/audit.spec.js:535:13)
|
|
351
|
+
at async Test.run (node:internal/test_runner/test:1125:7)
|
|
352
|
+
at async Suite.processPendingSubtests (node:internal/test_runner/test:787:7)
|
|
353
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
354
|
+
IO missing. Publish has no effect without io or restApi
|
|
355
|
+
Running queries: /* prostgles internal query that should be excluded from schema watch */
|
|
356
|
+
|
|
357
|
+
CREATE TABLE "audit_next_events" (
|
|
358
|
+
"id" BIGSERIAL PRIMARY KEY ,
|
|
359
|
+
"created_at" TIMESTAMPTZ NOT NULL DEFAULT clock_timestamp() ,
|
|
360
|
+
"schema_name" TEXT NOT NULL ,
|
|
361
|
+
"table_name" TEXT NOT NULL ,
|
|
362
|
+
"operation" TEXT NOT NULL CHECK("operation" = 'INSERT' OR "operation" = 'UPDATE' OR "operation" = 'DELETE'),
|
|
363
|
+
"old_id" JSONB ,
|
|
364
|
+
"new_id" JSONB ,
|
|
365
|
+
"old_row" JSONB ,
|
|
366
|
+
"new_row" JSONB ,
|
|
367
|
+
"actor" JSONB ,
|
|
368
|
+
"db_context" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"transaction_id":"string","transaction_started_at":"string","statement_started_at":"string","current_role":"string","session_user":"string","application_name":"string"}}'::TEXT, "db_context", '{"table":"audit_next_events","column":"db_context"}' ))
|
|
369
|
+
);
|
|
370
|
+
Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
|
|
371
|
+
IO missing. Publish has no effect without io or restApi
|
|
372
|
+
destroying prgl instance
|
|
373
|
+
✔ Managed audit setup, row history, protection, access and query readiness (7803.48814ms)
|
|
374
|
+
✔ getJSONBSchemaValidationErrorAsync with real db handlers (3.151105ms)
|
|
375
|
+
getPubSubManagerInitQuery: Outdated prostgles schema. Re-creating...
|
|
376
|
+
✔ Parallel subscription at init causing crash in getPubSubManager: duplicate key value violates unique constraint "apps_pkey" (101.590612ms)
|
|
377
|
+
✔ RLS context is isolated across implicit transactions, commit, rollback and pool reuse (10.218836ms)
|
|
378
|
+
✔ subscription and sync reads isolate users with a real RLS policy (16.06643ms)
|
|
379
|
+
✔ ordinary beforeEach hooks transform inputs before validation (40.273966ms)
|
|
380
|
+
✔ multi false is checked after beforeEach and rolls back the update (13.372326ms)
|
|
381
|
+
✔ ordinary beforeEach hooks run before PostgreSQL UPDATE policy checks (13.96613ms)
|
|
382
|
+
✔ before and after hooks preserve RLS across dbx and raw tx calls (19.932204ms)
|
|
383
|
+
▶ post-transaction hooks receive committed and authenticated context
|
|
384
|
+
✔ afterCommit runs after commit, filters changed fields and skips rollback (19.040301ms)
|
|
385
|
+
✔ clearing a watched field runs before, after and commit hooks (3.157222ms)
|
|
386
|
+
✔ client updateBatch runs hooks atomically in implicit and explicit transactions (14.008598ms)
|
|
387
|
+
destroying prgl instance
|
|
388
|
+
✔ server-user requests preserve tenant_id from sessionFields (1.135162ms)
|
|
389
|
+
✔ post-transaction hooks receive committed and authenticated context (1189.132482ms)
|
|
390
|
+
✔ Self reference recursion bug (3.322298ms)
|
|
391
|
+
✔ Transactions (14.198568ms)
|
|
392
|
+
(server): Server-only query tests successful
|
|
393
|
+
(server): Starting isomorphic queries
|
|
394
|
+
✔ TableConfig onMount works (3.141093ms)
|
|
395
|
+
✔ Server Only Queries (18613.805722ms)
|
|
396
|
+
(server): DELETING items
|
|
397
|
+
▶ Isomorphic queries
|
|
398
|
+
✔ Deleting stale data (34.331377ms)
|
|
399
|
+
✔ Error structure malformed array literal (14.250754ms)
|
|
400
|
+
✔ Table info (0.327126ms)
|
|
401
|
+
✔ Prepare data (30.172629ms)
|
|
402
|
+
✔ Test bytea (2.734983ms)
|
|
403
|
+
✔ abortSignal terminates a running query (5523.128166ms)
|
|
404
|
+
✔ Client queries are aborted no more than after n seconds (0.204435ms)
|
|
405
|
+
✔ Subscription tracked_columns get merged correctly (13.200423ms)
|
|
406
|
+
✔ Aggregate subscription tracks FILTER and ORDER BY dependencies (931.141372ms)
|
|
407
|
+
✔ CASE select and subscription dependencies (623.684379ms)
|
|
408
|
+
✔ Subscription tracks non-selected ORDER BY columns (622.383733ms)
|
|
409
|
+
✔ merge json (6.033043ms)
|
|
410
|
+
✔ json array converted to pg array filter bug (1.325325ms)
|
|
411
|
+
✔ onConflict do update (5.467692ms)
|
|
412
|
+
✔ Local file upload (26.139869ms)
|
|
413
|
+
✔ Local file delete (19.523598ms)
|
|
414
|
+
✔ Local file update (26.215275ms)
|
|
415
|
+
✔ getColumns definition (0.584371ms)
|
|
416
|
+
✔ returnType (0.234301ms)
|
|
417
|
+
✔ Table config triggers (4.467599ms)
|
|
418
|
+
✔ $unnest_words (0.71198ms)
|
|
419
|
+
✔ Group by/Distinct (0.872664ms)
|
|
420
|
+
✔ sql returntype default-with-rollback (9.097832ms)
|
|
421
|
+
✔ returnType: value (0.642708ms)
|
|
422
|
+
✔ PostgreSQL array element (2.879369ms)
|
|
423
|
+
✔ FTS filtering (6.940981ms)
|
|
424
|
+
✔ $term_highlight (2.604442ms)
|
|
425
|
+
✔ funcFilters: $term_highlight (2.030072ms)
|
|
426
|
+
(server): [{"name":null}]
|
|
427
|
+
(server): [{"name":"zz3zz1"}]
|
|
428
|
+
(server): []
|
|
429
|
+
✔ subscribe skipChangedColumnsCheck false by default = sub should not fire if selected data did not change (851.443859ms)
|
|
430
|
+
(server): [{"name":null}]
|
|
431
|
+
(server): [{"name":"zz3zz1"}]
|
|
432
|
+
(server): [{"name":"zz3zz1"}]
|
|
433
|
+
(server): [{"name":"zz3zz1"}]
|
|
434
|
+
(server): []
|
|
435
|
+
✔ subscribe skipChangedColumnsCheck true (3355.171825ms)
|
|
436
|
+
unsubscribe start - various
|
|
437
|
+
unsubscribe end - various
|
|
438
|
+
✔ subscribe (31.270758ms)
|
|
439
|
+
✔ subscribe to schema.table (13.974102ms)
|
|
440
|
+
✔ parallel subscriptions (2023.526996ms)
|
|
441
|
+
(server): updateAll done in 1562
|
|
442
|
+
(server): updateAll done in 1552
|
|
443
|
+
(server): updateAll done in 1872
|
|
444
|
+
✔ subscriptions do not serialize transactions (9504.79976ms)
|
|
445
|
+
Created PubSubManager
|
|
446
|
+
throttling sub for 1700 ms
|
|
447
|
+
✔ subscribeOne with throttle (1750.384438ms)
|
|
448
|
+
throttling finished. pushSubData...
|
|
449
|
+
throttling sub for 1700 ms
|
|
450
|
+
✔ subscribeOne with throttle skipFirst: true (1706.095761ms)
|
|
451
|
+
✔ subscribeOne without skipFirst (1047.85755ms)
|
|
452
|
+
✔ subscribeOne with skipFirst: true (1549.374653ms)
|
|
453
|
+
✔ subscribeOne actions: { insert: true } (1550.679658ms)
|
|
454
|
+
✔ subscribeOne actions: { insert: false } (1527.227009ms)
|
|
455
|
+
✔ JSON filtering (2.028524ms)
|
|
456
|
+
✔ Complex filtering (1.705772ms)
|
|
457
|
+
✔ template_string function (1.453738ms)
|
|
458
|
+
✔ Between filtering (1.338647ms)
|
|
459
|
+
✔ In filtering (1.367534ms)
|
|
460
|
+
✔ Order by (1.547765ms)
|
|
461
|
+
✔ Order by aliased func (0.980252ms)
|
|
462
|
+
✔ Filter by aliased func (1.071832ms)
|
|
463
|
+
✔ Count with Filter by aliased func (1.419161ms)
|
|
464
|
+
✔ Count with Aggregate and Filter by aliased func (1.16892ms)
|
|
465
|
+
✔ Count with complex filter (1.012079ms)
|
|
466
|
+
✔ Order by aggregation (0.839517ms)
|
|
467
|
+
✔ Aggregate FILTER and ORDER BY (0.973012ms)
|
|
468
|
+
✔ Column alias func (0.834435ms)
|
|
469
|
+
✔ Order by colliding alias name (0.811947ms)
|
|
470
|
+
✔ Update batch example (3.028563ms)
|
|
471
|
+
TODO: socket.io stringifies dates
|
|
472
|
+
✔ Function example (7.736769ms)
|
|
473
|
+
✔ JSONB filtering (3.753926ms)
|
|
474
|
+
✔ Postgis examples (8.714387ms)
|
|
475
|
+
✔ jsonbSchema validation (3.61393ms)
|
|
476
|
+
✔ find and findOne (0.751047ms)
|
|
477
|
+
✔ Result size (1.254893ms)
|
|
478
|
+
✔ Basic exists (1.267037ms)
|
|
479
|
+
✔ Basic fts with shorthand notation (2.03205ms)
|
|
480
|
+
✔ Exists with shortest path wildcard filter example (1.418591ms)
|
|
481
|
+
✔ Exists with exact path filter example (0.665416ms)
|
|
482
|
+
✔ Not Exists with exact path filter example (0.712179ms)
|
|
483
|
+
✔ Upsert example (25.824863ms)
|
|
484
|
+
✔ Joins example (1.728215ms)
|
|
485
|
+
✔ Joins repeating table example (2.195923ms)
|
|
486
|
+
✔ Join aggregate functions example (20.98067ms)
|
|
487
|
+
✔ $rowhash example (4.305196ms)
|
|
488
|
+
✔ Reference column nested insert (5.545551ms)
|
|
489
|
+
✔ Join escaped table names with quotes (9.460576ms)
|
|
490
|
+
(server): {
|
|
491
|
+
"item": {
|
|
492
|
+
"\"id0\"": 1,
|
|
493
|
+
"\"quoted1_id\"": 1,
|
|
494
|
+
"\"text_col0\"": "0"
|
|
495
|
+
},
|
|
496
|
+
"runs": 0
|
|
497
|
+
}
|
|
498
|
+
(server): {
|
|
499
|
+
"item": {
|
|
500
|
+
"\"id0\"": 1,
|
|
501
|
+
"\"quoted1_id\"": 1,
|
|
502
|
+
"\"text_col0\"": "1"
|
|
503
|
+
},
|
|
504
|
+
"runs": 1
|
|
505
|
+
}
|
|
506
|
+
unsubscribe start - """quoted0"""
|
|
507
|
+
unsubscribe end - """quoted0"""
|
|
508
|
+
✔ subscribe to escaped table name (14.214531ms)
|
|
509
|
+
✔ subscribe using a filter bigger than block_size (16.327428ms)
|
|
510
|
+
✔ Reverse join with agg (8.236761ms)
|
|
511
|
+
{
|
|
512
|
+
_rows: [
|
|
513
|
+
{ id: 1, t1: null, tr2: [Array], tr3: [] },
|
|
514
|
+
{ id: 2, t1: null, tr2: [Array], tr3: [] }
|
|
515
|
+
],
|
|
516
|
+
runs: 1
|
|
517
|
+
}
|
|
518
|
+
{
|
|
519
|
+
_rows: [
|
|
520
|
+
{ id: 1, t1: null, tr2: [Array], tr3: [] },
|
|
521
|
+
{ id: 2, t1: null, tr2: [Array], tr3: [] }
|
|
522
|
+
],
|
|
523
|
+
runs: 2
|
|
524
|
+
}
|
|
525
|
+
✔ Related table subscribe (9028.369066ms)
|
|
526
|
+
✔ Aggregate FILTER registers joined dependency triggers (636.239323ms)
|
|
527
|
+
✔ Nested sort by computed col (5.099093ms)
|
|
528
|
+
✔ Nested function on different than source column getNewQuery name bug fix (1.169488ms)
|
|
529
|
+
✔ Reference column deep nested insert (11.500552ms)
|
|
530
|
+
✔ Multi reference column nested insert (9.615576ms)
|
|
531
|
+
✔ Join path with order by nested (7.391335ms)
|
|
532
|
+
✔ Self join (14.896427ms)
|
|
533
|
+
✔ One to many multi join duplicate row bug fix (10.576929ms)
|
|
534
|
+
(server): various id=99 count
|
|
535
|
+
(server): various id=99 count
|
|
536
|
+
ok
|
|
537
|
+
(server): various id=99 count
|
|
538
|
+
(server): Error in subscription callback: {"message":"column prostgles_root_table_alias.name does not exist","length":130,"name":"error","severity":"ERROR","code":"42703","position":"107","file":"parse_relation.c","line":"3665","routine":"errorMissingColumn","query":"-- prostgles query id: 1784fcee-870d-4420-b75e-860c63f87568\nSET LOCAL \"prostgles.user\" \nTO '';\nSELECT \n \"prostgles_root_table_alias\".\"name\" AS \"name\" \n FROM ( \n SELECT * \n FROM various \n WHERE \"id\" = 99 \n ) prostgles_root_table_alias \n LIMIT 1000","code_info":"undefined_column"}
|
|
539
|
+
ok
|
|
540
|
+
✔ subscribe triggers with stale schema should fail gracefully and never block other queries (6532.127677ms)
|
|
541
|
+
✔ Isomorphic queries (49245.710999ms)
|
|
542
|
+
✔ Having clause (1.815762ms)
|
|
543
|
+
✔ Having clause with complex filter (1.223021ms)
|
|
544
|
+
(server): Server isomorphic tests successful
|
|
545
|
+
(server): Stopping server ...
|
|
546
|
+
ℹ tests 134
|
|
547
|
+
ℹ suites 2
|
|
548
|
+
ℹ pass 134
|
|
549
|
+
ℹ fail 0
|
|
550
|
+
ℹ cancelled 0
|
|
551
|
+
ℹ skipped 0
|
|
552
|
+
ℹ todo 0
|
|
553
|
+
ℹ duration_ms 73947.878076
|