Skip to content
Draft
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
82c0624
10705-dxox: add transaction support
Mwindo Jul 10, 2025
af85838
10705-dxox: try alternative, slightly fuzzier transaction support.
Mwindo Jul 10, 2025
655cd74
10705-dxox: simplify logic for getting a token, and add a health check
Mwindo Jul 11, 2025
cdd97fa
10705-dxox: remove tests that will just need to be entirely redone
Mwindo Jul 11, 2025
87e3686
10705-dxox: put comments in environment.ts; if someone botches the co…
Mwindo Jul 11, 2025
b848bde
10705-dxox: implement better transaction support
Mwindo Jul 11, 2025
12881c9
10705-dxox: reorder transactions.ts
Mwindo Jul 12, 2025
055e725
10705-dxox: add back one test
Mwindo Jul 12, 2025
6bb585b
10705-dxox: use kysely api to handle some of what was being done manu…
Mwindo Jul 12, 2025
c5f3410
10705-dxox: we were mixing concerns with the token refresh logic; thi…
Mwindo Jul 12, 2025
f113491
10705-dxox: return right password for connections locally
Mwindo Jul 12, 2025
9e6987c
10705-dxox: getConnection is a terrible name and leads us to think ab…
Mwindo Jul 12, 2025
4f0db2e
10705-dxox: minor refactor
Mwindo Jul 12, 2025
8f8761d
10705-dxox: refactor mutex locks, rename and move some files
Mwindo Jul 12, 2025
a9468a8
10705-dxox: fix failing tests due to new tryReleaseLocks
Mwindo Jul 12, 2025
03dfdad
10705-dxox: add test for mutex and for rds token generation
Mwindo Jul 14, 2025
a253335
10705-dxox: mutext lol
Mwindo Jul 15, 2025
6333c0b
10705-dxox: remove health check
Mwindo Jul 15, 2025
ff709ed
10705-dxox: only run post-commit hook ... after committing
Mwindo Jul 15, 2025
2d6e048
Merge branch 'staging' into 10705-dxox
jimlerza Jul 16, 2025
901a62a
10705-dxox: revision to databaseConnection after testing on a deploye…
Mwindo Jul 23, 2025
6de3399
10705-dxox: update connection logic according to work done for 10725
Mwindo Jul 25, 2025
ef9ec7a
10705-dxox: add unit test
Mwindo Jul 25, 2025
683e646
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into 10705-dxox
Mwindo Jul 25, 2025
6f17f31
10705-dxox: fix merge issue
Mwindo Jul 25, 2025
63eb4b1
10705-dxox: add withTransaction to a "low-stakes" persistence function
Mwindo Jul 25, 2025
33dc4b4
10705-dxox: mock acquireOneDbConnection
Mwindo Jul 25, 2025
34d5bda
10705-dxox: fix databaseConnection.test.ts
Mwindo Jul 25, 2025
b09d955
10705-dxox: use new DatabaseConnectionError
Mwindo Jul 26, 2025
4230410
10705-dxox: revert to getLockingDbConnection
Mwindo Jul 30, 2025
d2444f8
10705-dxox: environment.stage rather than nodeEnv
Mwindo Jul 30, 2025
2b022fd
10705-dxox: fix databaseConnection.test.ts
Mwindo Jul 30, 2025
94c9245
10705-dxox-to-test: simplify callback in pgPool password
Mwindo Jul 31, 2025
a89c356
10705-dxox: update documentation on transactions
Mwindo Jul 31, 2025
207f109
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into 10705-dxox
Mwindo Aug 5, 2025
0302c85
10704-dxox: use withTransaction in createMessageAsReply
Mwindo Aug 5, 2025
f4fe24a
Merge branch 'staging' into 10705-dxox
Mwindo Aug 7, 2025
83e8ca5
10705-dxox: fix merge issue in getCaseDeadlinesByConsolidatedCaseDead…
Mwindo Aug 7, 2025
4290ae2
merge in staging and fixing conflicts
codyseibert Dec 4, 2025
8c8ac7c
fixing import
codyseibert Dec 4, 2025
f81a14c
10705 - remove Date to use standard format
codyseibert Dec 5, 2025
3396ed3
10705 - starting to refactor some more endpoints to use transactions
codyseibert Dec 8, 2025
3fcff9e
10705 - fixing typesecript errors
codyseibert Dec 8, 2025
7f4cd02
10705 - fix ts errors
codyseibert Dec 9, 2025
5b6bcca
10705 - fix another ts error
codyseibert Dec 9, 2025
7fede9d
10705 - fix import in cleanup script
codyseibert Dec 9, 2025
e123f76
Merge branch 'staging' into 10705-dxox
jimlerza Dec 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Signer } from '@aws-sdk/rds-signer';
import type { Database } from '@web-api/database-schema';
import type { Database } from '@web-api/persistence/postgres/database-schema';
import { getCypressEnv } from 'cypress/helpers/env/cypressEnvironment';
import fs from 'fs';
import { CamelCasePlugin, Kysely, PostgresDialect } from 'kysely';
Expand Down
2 changes: 1 addition & 1 deletion scripts/archived/run-once/cleanup-corrupt-messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { queryFull } from '@web-api/persistence/dynamodbClientService';
import PQueue from 'p-queue';
import fs from 'fs';
import path from 'path';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';

const scriptConfig: ScriptConfig = {
description:
Expand Down
2 changes: 1 addition & 1 deletion scripts/reindex/index-cases/_index-cases-child.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import {
OPENSEARCH_SYNC_ACTIONS,
Expand Down
2 changes: 1 addition & 1 deletion scripts/reindex/index-cases/index-cases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { spawn } from 'child_process';
import { CompiledQuery } from 'kysely';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import {
OPENSEARCH_SYNC_ACTIONS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { spawn } from 'child_process';
import { CompiledQuery } from 'kysely';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import { calculateDate } from '@shared/business/utilities/DateHandler';
import { batchDeleteDynamoItems } from 'scripts/run-once-scripts/postgres-migration/batch-delete-dynamo-items';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { spawn } from 'child_process';
import { CompiledQuery } from 'kysely';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import { batchDeleteDynamoItems } from './batch-delete-dynamo-items';
import { environment } from '@web-api/environment';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import { batchDeleteDynamoItems } from './batch-delete-dynamo-items';
import { environment } from '@web-api/environment';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '../../helpers/parseArgsAndEnvVars';
import { batchDeleteDynamoItems } from './batch-delete-dynamo-items';
import { environment } from '@web-api/environment';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';

const scriptConfig: ScriptConfig = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import { batchDeleteDynamoItems } from './batch-delete-dynamo-items';
import { environment } from '@web-api/environment';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import { batchDeleteDynamoItems } from './batch-delete-dynamo-items';
import { environment } from '@web-api/environment';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import { batchDeleteDynamoItems } from './batch-delete-dynamo-items';
import { environment } from '@web-api/environment';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import { batchDeleteDynamoItems } from './batch-delete-dynamo-items';
import { environment } from '@web-api/environment';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { environment } from '@web-api/environment';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import {
OPENSEARCH_SYNC_ACTIONS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import { environment } from '@web-api/environment';
import { CompiledQuery } from 'kysely';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
parseArgsAndEnvVars,
type ScriptConfig,
} from '../../helpers/parseArgsAndEnvVars';
import { getDbReader } from '@web-api/database';
import { getDbReader } from '@web-api/persistence/postgres/database';
import { isEmpty } from 'lodash';
import { environment } from '@web-api/environment';
import { CompiledQuery } from 'kysely';
Expand Down
2 changes: 1 addition & 1 deletion web-api/src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const environment = {
(process.env.NODE_ENV !== 'test'
? 'localhost'
: getJestDBConnectionError()),
idleTimeoutMillis: isRunningOnLambda ? null : 1000, // null idleTimeoutMillis means the db connection is never closed.
idleTimeoutMillis: isRunningOnLambda ? null : 1000, // null idleTimeoutMillis means the db connection is never closed. Be careful changing this.
max: 1,
password: process.env.POSTGRES_PASSWORD || 'example',
port: 5432,
Expand Down
2 changes: 1 addition & 1 deletion web-api/src/gateways/openSearch/openSearchSyncLocal.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DatabaseSchema } from '@web-api/database-schema';
import { DatabaseSchema } from '@web-api/persistence/postgres/database-schema';
import { OpenSearchSyncMessage } from '@web-api/lambdas/openSearch/openSearchSyncHandler';

export const openSearchSyncLocal = async ({
Expand Down
102 changes: 0 additions & 102 deletions web-api/src/getConnection.ts

This file was deleted.

26 changes: 0 additions & 26 deletions web-api/src/getConnection1.test.ts

This file was deleted.

24 changes: 0 additions & 24 deletions web-api/src/getConnection2.test.ts

This file was deleted.

62 changes: 0 additions & 62 deletions web-api/src/getConnection3.test.ts

This file was deleted.

Loading
Loading