Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10491 work item refactor #5519

Draft
wants to merge 72 commits into
base: staging
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
e8420a8
10391 - starting work to refactor work items
codyseibert Sep 24, 2024
16f12f6
10391 - refactoring the qc inbox to use postgres instead of elasticse…
codyseibert Sep 24, 2024
5c74ea9
10391 - refactoring a few more methods
codyseibert Sep 24, 2024
f59ff36
10391: sort prop fields in seed data
jtdevos Sep 24, 2024
c2eb549
Merge branch '10391-work-item-refactor' of https://github.com/flexion…
jtdevos Sep 24, 2024
e000047
10491 - refactoring more work items
codyseibert Sep 26, 2024
51b188d
Merge branch '10391-dynamo-migrations-kysely-aurora-rds-tokens' of gi…
pixiwyn Sep 27, 2024
50887b3
10491: Refactor out duplicate case details
pixiwyn Sep 27, 2024
15f86d2
10491: join with case
pixiwyn Sep 27, 2024
3879a0d
10491: covert remaining dynamodb functions
pixiwyn Sep 27, 2024
1159aa5
10491: fix lint errors
pixiwyn Sep 30, 2024
34676fc
Merge branch '10391-dynamo-migrations-kysely-aurora-rds-tokens' of gi…
pixiwyn Sep 30, 2024
0f98fef
Merge branch '10391-dynamo-migrations-kysely-aurora-rds-tokens' of gi…
pixiwyn Oct 2, 2024
b4f8c99
10491 - trying to fix work items
codyseibert Oct 2, 2024
13b715a
10491: add mocks + use in api test
pixiwyn Oct 2, 2024
49fea39
10491: fix workitems mock import name
pixiwyn Oct 2, 2024
23ae202
10491: fix mocks path
pixiwyn Oct 2, 2024
4b3c9cf
10491 - fetching work items when doing queryFull
codyseibert Oct 3, 2024
d630e0f
Merge branch '10391-dynamo-migrations-kysely-aurora-rds-tokens' of gi…
pixiwyn Oct 4, 2024
604212f
10491: refactor to use prefix
pixiwyn Oct 4, 2024
1a060ac
10491: fix shared tests
pixiwyn Oct 4, 2024
b88f8c9
10491: fix linting errors
pixiwyn Oct 4, 2024
4e1e5a7
10491: update broken mock
pixiwyn Oct 4, 2024
e6368ca
10491: fix mocks
pixiwyn Oct 4, 2024
69a625e
10491: remove unnecessary tests + add mock values
pixiwyn Oct 8, 2024
0df7f78
10491: fix shared tests
pixiwyn Oct 8, 2024
a1a39c9
10491: update association if workItems and add mock
pixiwyn Oct 8, 2024
abc2f20
10491: add additional mocks
pixiwyn Oct 8, 2024
508e7ad
10491: add default returnValue
pixiwyn Oct 8, 2024
ec2e952
10491: fix shared tests
pixiwyn Oct 8, 2024
0ba8e15
10491: fix api tests
pixiwyn Oct 8, 2024
058cd40
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into 10491-wor…
pixiwyn Oct 8, 2024
ac16041
10491: fix more tests
pixiwyn Oct 8, 2024
5ed20d2
fixing some integration tests
codyseibert Oct 8, 2024
31eab83
Merge branch '10491-work-item-refactor' of github.com:flexion/ef-cms …
codyseibert Oct 8, 2024
aa5651f
10491: fix sentWorkItemsExpireAfterNDays.test.ts
pixiwyn Oct 8, 2024
c16b3b4
Merge branch '10491-work-item-refactor' of github.com:flexion/ef-cms …
pixiwyn Oct 8, 2024
2685218
10491 - fixing integration test
codyseibert Oct 9, 2024
b5919db
10491: fix api tests
pixiwyn Oct 9, 2024
3575038
10491 - fixing more integration tests
codyseibert Oct 9, 2024
1ec0f19
Merge branch '10491-work-item-refactor' of github.com:flexion/ef-cms …
codyseibert Oct 9, 2024
4495d6d
10491: fix api tests
pixiwyn Oct 9, 2024
6f92426
Merge branch '10491-work-item-refactor' of github.com:flexion/ef-cms …
pixiwyn Oct 9, 2024
663d6ae
10491: fix api tests
pixiwyn Oct 9, 2024
0208f12
10491 - fixing more integration tests
codyseibert Oct 9, 2024
0e8fb91
10491 - fixing more integration tests
codyseibert Oct 9, 2024
9bf112d
10491: fix remaining tests (hopefully?)
pixiwyn Oct 10, 2024
bc09c44
10491: fix last test
pixiwyn Oct 11, 2024
2747950
10492: resolve conflicts
pixiwyn Nov 6, 2024
f0252e3
10491: update spell check
pixiwyn Nov 6, 2024
41c118c
10491-work-item-refactor: fix failing tests and type errors
Mwindo Nov 6, 2024
49a723a
10491-dxox: add delete script for work items; todo, delete script for…
Mwindo Nov 20, 2024
8c7b54d
10491-dxox: add delete scripts for outboxes
Mwindo Nov 20, 2024
38d4183
10491-work-items: update delete scripts
Mwindo Dec 3, 2024
aa2df5b
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into 10491-wor…
pixiwyn Dec 3, 2024
2833a46
10491-dxox: change saveWorkItem to upsertWorkItems for consistency wi…
Mwindo Dec 10, 2024
768602a
10491-dxox: upsert work items into postgres and add test; also, use g…
Mwindo Dec 10, 2024
e74c2fe
10491-dxox: fix overlooked renames
Mwindo Dec 10, 2024
2ecea56
10491-dxox: upsert last in processWorkItemEntries to prevent latency …
Mwindo Dec 10, 2024
f58a675
10491-dxox: add indices to work-items and restructure queries slightl…
Mwindo Dec 11, 2024
7ea0166
10491: return workItem when submitting paper filing
pixiwyn Dec 17, 2024
44a059e
10491: add test for new optional work item and work item id
pixiwyn Dec 17, 2024
43a4436
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into 10491-wor…
pixiwyn Dec 17, 2024
81b76f1
10491: update package lock file
pixiwyn Dec 17, 2024
9ab7121
10491: fix broken tests
pixiwyn Dec 17, 2024
e16dfc1
10491-dxox: fixed bug with unassigned filter not showing unassigned w…
pixiwyn Dec 30, 2024
cc4a4e2
10491-dxox: filter out redundant dynamo records if they exists
pixiwyn Dec 31, 2024
a915709
Merge branch 'staging' into 10491-work-item-refactor
pixiwyn Dec 31, 2024
b91bc18
10491-dxox: fix failing API and integration tests
pixiwyn Dec 31, 2024
ddf740b
Merge branch '10491-work-item-refactor' of github.com:flexion/ef-cms …
pixiwyn Dec 31, 2024
eafe909
10491-dxox: remove docker volumes on run-local.sh and update postgres…
pixiwyn Dec 31, 2024
fc1b93a
10491-dxox: use completedAt rather than createdAt in getDocumentQCSer…
Mwindo Jan 1, 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
6 changes: 3 additions & 3 deletions cypress/local-only/support/pages/create-paper-petition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export const postPaperPetition = () => {
cy.get('#submit-case').click();

return cy.wait('@postPaperCase').then(({ response }) => {
if (!response || !response.body?.docketNumber) {
if (!response || !response.body?.caseDetail.docketNumber) {
throw new Error(
'Unable to get docket number from postPaperCase HTTP request',
);
}
expect(response.body).to.have.property('docketNumber');
return cy.wrap({ docketNumber: response.body.docketNumber! });
expect(response.body.caseDetail).to.have.property('docketNumber');
return cy.wrap({ docketNumber: response.body.caseDetail.docketNumber! });
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ describe('Notes Icon triggered by Judges Notes', () => {
cy.get('#submit-case').click();

cy.wait('@postPaperCase').then(({ response }) => {
if (!response || !response.body?.docketNumber) {
if (!response || !response.body?.caseDetail.docketNumber) {
throw new Error(
'Unable to get Docket Number from postPaperCase HTTP request',
);
}
newDocketNumber = response.body?.docketNumber;
newDocketNumber = response.body?.caseDetail.docketNumber;
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const createCaseWithAutoGeneratedNANE = () => {
cy.get('#submit-case').click();

cy.wait('@postPaperCase').then(({ response }) => {
const { docketNumber } = response.body;
const { docketNumber } = response!.body.caseDetail;
cy.get('#orders-notices-auto-created-in-draft').should('exist');
cy.get('#submit-case').scrollIntoView();
cy.get('#submit-case').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ describe('Trial Session Paper Pdf', { scrollBehavior: 'center' }, () => {
cy.intercept('POST', '**/paper').as('postPaperCase');
cy.get('#submit-case').click();
cy.wait('@postPaperCase').then(({ response: paperCaseResponse }) => {
const petitionId = paperCaseResponse?.body.docketEntries.find(
(d: any) => d.documentTitle === 'Petition',
).docketEntryId;
const docketNumber = paperCaseResponse?.body.docketNumber;
const petitionId =
paperCaseResponse?.body.caseDetail.docketEntries.find(
(d: any) => d.documentTitle === 'Petition',
).docketEntryId;
const docketNumber = paperCaseResponse?.body.caseDetail.docketNumber;
cy.visit(
`/case-detail/${docketNumber}/petition-qc/document-view/${petitionId}`,
);
Expand Down
51 changes: 50 additions & 1 deletion docs/postgres/restore.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,58 @@
# Postgres - Restore Database

## Database goes offline (Fire drill)
## Database goes offline / Lost data (Fire drill)

Ensure snapshot exists for restore (aws console, rds -> snapshots).

### Manual Restore Process

- In AWS, restore from desired snapshot to restore instance.

- Source to your target env

- Using the script below
`scripts/postgres/connect.sh`

- Temporarily modify the line
`PGPASSWORD="$DB_TOKEN" psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME"`

To restore the database:
```
PGPASSWORD="$DB_TOKEN" pg_restore \
--host="$DB_HOST" \
--username="$DB_USER" \
--dbname="$DB_NAME" \
--port="$DB_PORT" \
--format=c \
--verbose \
--clean \
--no-privileges \
--no-owner \
--table=dw_case \ # optional if doing per table
--jobs=3 \
"backup.sql"
```

To backup the database:
```
PGPASSWORD="$DB_TOKEN" pg_dump \ # change to restore instance password
--host="$DB_HOST" \ # change to restore instance host
--username="$DB_USER" \
--port="$DB_PORT" \
--dbname="$DB_NAME" \
--file="backup.sql" \
--format=c \
--no-privileges \
--no-owner \
--verbose
```

- Run the script for the backup and restore operation (separately one at a time).

- Re-add indexes using tables plus by going to each table on the restore instance under the structure tab copy and paste to target instance (writer).

- Delete the restore instance and regional cluster (in this order).

### Terraform Process

#### Prepare for deletion
Expand Down
Loading
Loading