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

merge staging into prod 09-20-2024 #5385

Merged
merged 73 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
109d981
10455-story: initial commit--needs a lot of cleanup, but message drop…
Mwindo Aug 19, 2024
3b5d3c9
10455-story: make old persistence method test-specific and remove it …
Mwindo Aug 19, 2024
eda345b
10455-story: update typing slightly, add test, update validation rule…
Mwindo Aug 20, 2024
4025844
10455-story: add script; update judge_users.csv and related code
Mwindo Aug 20, 2024
c98e604
10455-story: decouple add-user validation from hard-coded chambers va…
Mwindo Aug 20, 2024
32074ff
10455-story: fix new type errors
Mwindo Aug 20, 2024
aa40dad
10455-story: fix a few type errors
Mwindo Aug 20, 2024
bde9c78
10455-story: update efcms-local with contact for judges
Mwindo Aug 21, 2024
dcc573b
10455-story: fix failing test (but should look into what changed)
Mwindo Aug 21, 2024
e2fa9ac
10455-story: update test to wait for selected text to update, hopeful…
Mwindo Aug 21, 2024
358b45b
10455-story: first draft of two new scripts
Mwindo Aug 21, 2024
51a1845
10455-story: update documentation
Mwindo Aug 21, 2024
7dc3a2d
10455-story: pull out some shared script logic into add-or-update-jud…
Mwindo Aug 21, 2024
af2b30a
10455-story: minor updates to scripts, remove some console logs
Mwindo Aug 22, 2024
ae22cc0
10455-story: refactor update-judge and add-phone-numbers-to-judge-rec…
Mwindo Aug 22, 2024
9113648
Merge branch 'staging' into 10455-story
Mwindo Aug 22, 2024
8185f59
10455-story: fix issues after testing in experimental1
Mwindo Aug 22, 2024
b5e9de7
10455-story: get chambers users, actually
Mwindo Aug 23, 2024
d9d6f33
10455-story: fix mistaken revision in update-judge--the interactor do…
Mwindo Aug 23, 2024
149e909
10455-story: fix failing test
Mwindo Aug 27, 2024
942afb4
10455-story: fix user validation
Mwindo Aug 27, 2024
f233782
Merge remote-tracking branch 'ustc/staging' into 10455-story
Mwindo Aug 28, 2024
8e877b1
10455-story: update interactor to use authorizedUser
Mwindo Aug 28, 2024
e00b3a4
10455-story: fix type errors after merge
Mwindo Aug 29, 2024
055163f
10455-story: fix validation, I think
Mwindo Aug 29, 2024
0074358
10455-story: fix failing test
Mwindo Aug 29, 2024
1975f56
10455-story: validation still not right
Mwindo Aug 29, 2024
f99d5d4
10455-story: update validation after learning more about joi
Mwindo Aug 29, 2024
d68aba1
10455-story: yet another attempt to get the validation working correctly
Mwindo Aug 29, 2024
e5269b2
10455-story: more changes after testing in experimental1
Mwindo Aug 30, 2024
efdab30
10455-story: fix order of validation errors
Mwindo Aug 30, 2024
88f8053
10455-story: add typing to judgesChambers
Mwindo Aug 30, 2024
2b85cc6
10455-story: add typing to setJudgesChambersAction
Mwindo Aug 30, 2024
e034f8f
10455-story: update documentation and remove redundant validation
Mwindo Aug 30, 2024
c44b4f7
10455-story: incorporate reviewer feedback
Mwindo Sep 2, 2024
ee52c81
10455-story: undo order of keys change
Mwindo Sep 2, 2024
321a864
10455-story: fix contact info for add-phone-numbers-to-judge-records.ts
Mwindo Sep 2, 2024
9632467
10455-story: fix script after taking comments into account and testin…
Mwindo Sep 3, 2024
dd16c9e
10455-story: update documentation
Mwindo Sep 4, 2024
3495ffe
10455-story: remove old script and add executable bit to scripts
Mwindo Sep 5, 2024
b7d6db1
10455-story: two small updates after more testing
Mwindo Sep 5, 2024
301bbd3
10455-story: remove duplicative sendEmail
Mwindo Sep 5, 2024
c9729e3
10455-story: new password in production should be randomized in add-u…
Mwindo Sep 5, 2024
c98e776
10427 Create new InlineLink component
En-8 Sep 9, 2024
f139bbe
10427 More uses of InlineLink in new petition flow
En-8 Sep 9, 2024
319e17f
10427 Improve styling of Add IRS Notice link-style button
En-8 Sep 9, 2024
bed4ec2
10427-story Improve focus state styling of Add Another IRS Notice
En-8 Sep 9, 2024
57584e6
10427 Minor tweaks to adjust font sizing
En-8 Sep 9, 2024
3596f82
Merge branch 'staging' into 10427-story-v2
En-8 Sep 9, 2024
f45e9a4
10427 revert unwanted change to inline link
En-8 Sep 10, 2024
0f08a6f
10427 tweaks to text wrapping of inline links
En-8 Sep 10, 2024
d952972
10427 Convert another to InlinLink on practitioner and petitioner das…
En-8 Sep 11, 2024
8b23ff4
10427 more removal of wrap text prop
En-8 Sep 11, 2024
1875b54
dep-update aws-sdk
JayFlexy Sep 11, 2024
b0ef894
dep-update more updates
JayFlexy Sep 11, 2024
c5ba119
dep-updates update versions
JayFlexy Sep 12, 2024
1d1f9d4
dep-updates update aws provider in terraform
JayFlexy Sep 13, 2024
7f90c13
dep-updates fix type error
JayFlexy Sep 13, 2024
3c964ee
dep-updates: rm unused listDomains function
JayFlexy Sep 13, 2024
236ad06
10455-story: modifying judge name is harder than expected, so depreca…
Mwindo Sep 17, 2024
e1a9598
Merge branch 'staging' into 10427-story-v2
En-8 Sep 17, 2024
06436b3
Merge pull request #5362 from flexion/dep-updates-20240911
jimlerza Sep 18, 2024
f123fc4
Merge branch 'staging' into 10427-story-v2
En-8 Sep 18, 2024
f87456e
10455-story: updates to reflect changes in test
Mwindo Sep 18, 2024
943ef8e
Merge remote-tracking branch 'ustc/staging' into 10455-story and upda…
Mwindo Sep 18, 2024
5d62b69
10455-story: actually update Way phone number in mockJudgesChambers
Mwindo Sep 18, 2024
77a45b8
Merge pull request #5344 from flexion/10427-story-v2
jtdevos Sep 18, 2024
7457c2a
Merge branch 'staging' into 10455-story
jimlerza Sep 19, 2024
e2bc457
Merge pull request #5264 from flexion/10455-story
jimlerza Sep 19, 2024
1d97e63
opex: added a script to quickly revoke a petitioner's e-access to a s…
jimlerza Sep 20, 2024
cf8d1db
opex: check for env vars before executing the AWS calls in the revoke…
jimlerza Sep 20, 2024
27c260d
opex: when revoking a petitioner's e-access, overwrite their contactI…
jimlerza Sep 20, 2024
e43eacc
Merge pull request #5384 from ustaxcourt/opex-revoke-e-access
jimlerza Sep 20, 2024
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
orbs:
git-shallow-clone: guitarrapc/[email protected]

efcms-docker-image: &efcms-docker-image $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:4.3.9
efcms-docker-image: &efcms-docker-image $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:4.3.10

parameters:
run_build_and_deploy:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN apt-get install -y build-essential
RUN apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.17.46.zip" -o "awscliv2.zip" && \
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.17.49.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { petitionsClerkCreatesTrialSession } from '../../../../helpers/trialSess
faker.seed(faker.number.int());

describe('trial sessions', () => {
it('verify the auto fill functionality for chambers phone number works when selectin a judge', () => {
it('verify the auto fill functionality for chambers phone number works when selecting a judge', () => {
loginAsPetitionsClerk1();
petitionsClerkCreatesTrialSession().then(trialSessionId => {
cy.get('[data-testid=new-trial-sessions-tab]').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ describe('Trial Session Paper Pdf', { scrollBehavior: 'center' }, () => {
);
cy.visit(`/edit-trial-session/${createdTrialSessionId}`);
cy.get('[data-testid="trial-session-judge"]').select('Colvin');
cy.get('[data-testid="trial-session-judge"] option:selected').should(
'have.text',
'Colvin',
);
cy.get('[data-testid="submit-edit-trial-session"]').click();
cy.url().should('include', 'print-paper-trial-notices');
cy.get('[data-testid="printing-complete"]').click();
Expand Down
27 changes: 27 additions & 0 deletions docs/operations/runbooks/add-or-update-judge-user.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Adding or Updating a Judge User

## Description
This runbook describes the process of onboarding or updating a Judge user. DO NOT use this runbook to offboard a judge. Instead, see `offboard-judge-user.md`.

## Preqrequisites
- `add-judge.ts`, `update-judge.ts` (see these scripts for usage details)
- Environment switcher config, `set-env.sh`
- AWS access (DynamoDB and Cognito)
- Standard development setup described in `running-locally.md`

## Steps for Adding or Updating a Judge User
1. If you want the new judge (or updated judge information) to be available in deployed environments other than test/prod, you will need to add or update the judge information in `judge_users.csv`. (There are plenty of examples in the CSV to guide you.) Once deployed in the given environment, these changes will take effect.
2. If you want the new judge (or updated judge information) to be available locally and in CI, you will need to add or update the judge information in `efcms-local.json`. Look at the other judge users (you can search the file for `judgeFullName`) for guidance.
3. To update the test environment: Use the environment switcher and run `add-judge.ts` or `update-judge.ts` according to your needs, e.g.:
```
source ./scripts/env/set-env.zsh ustc-test
npx ts-node --transpile-only ./scripts/user/add-judge.ts ...
```
These scripts will add/update the appropriate user records in Cognito and Dynamo.
4. To update the production environment: If you have access to the production environment, run either `add-judge.ts` or `update-judge.ts` as above. If you do not have access, hand off to a USTC engineer, linking to this documentation.

## Caveat
If you update the name of a judge, their chambers section will be updated as well. However, as of 4 September 2024, we do not have anything that prevents a stale edit from overwriting an update. In other words, the following is possible:
- An admin begins to update a chambers user
- The script to update the judge's name is run
- The admin finishes the updates to the chambers user (in principle up to 24 hours later), overwriting that user's newly updated chambers section
31 changes: 16 additions & 15 deletions docs/operations/runbooks/offboard-judge-user.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
# Offboarding a Judge user

## Description
This runbook describes the process of offboarding a Judge user if they no longer work with the US Tax Court, for whatever reason. This will mark the Judge as a "legacy" Judge, meaning they won't be an available choice for assigment on any active work in DAWSON, but will still be available in places where legacy Judges should be, e.g. Order & Opinion searches.
This runbook describes the process of offboarding a Judge user if they no longer work with the US Tax Court, for whatever reason. This will mark the Judge as a "legacy" Judge, meaning they won't be an available choice for assignment on any active work in DAWSON, but will still be available in places where legacy Judges should be, e.g. Order & Opinion searches.

Since completing this runbook in its entirety requires access to USTC environments, this runbook includes a handoff to a USTC Engineer with the necessary priveleges to adminster USTC environments.
Since completing this runbook in its entirety requires access to USTC environments, this runbook includes a handoff to a USTC Engineer with the necessary privileges to administer USTC environments.

## Preqrequisites
## Prerequisites
- `offboard-judge-user.sh`
- Environment switcher config, `set-env.sh`
- AWS access (DynamoDB and Cognito)
- Standard development setup described in `running-locally.md`
- The Judge being offboarded should not have any active cases / trials / etc. assigned to them. (Check with the PO for whether or not this has happened)

## Steps
1. In `judge_users.csv`, find the Judge to be offboared. Change their role from `judge` to `legacyJudge` and their section from `{judgeName}Chambers` to `legacyJudgeChambers`. For example:
### To Update the Judge User in Deployed Environments Other Than Test/Prod
1. In `judge_users.csv`, find the Judge to be offboarded. Change their role from `judge` to `legacyJudge` and their section from `{judgeName}Chambers` to `legacyJudgeChambers`. For example:
```
Colvin,Judge,John O. Colvin,[email protected],judge,colvinsChambers,true
Colvin,Judge,John O. Colvin,[email protected],judge,colvinsChambers,true,(123) 123-1234
```
becomes
```
Colvin,Judge,John O. Colvin,[email protected],legacyJudge,legacyJudgesChambers,true
Colvin,Judge,John O. Colvin,[email protected],legacyJudge,legacyJudgesChambers,true,(123) 123-1234
```
2. Remove their chambers from the list of valid sections in `add-user.ts`
3. In `getJudgesChambers.ts`, add `isLegacy: process.env.USTC_ENV === 'prod',` to their chambers section. This marks their chambers section as legacy in deployed environments so that they no longer show up in select inputs for selecting a Judge's chambers.
4. Check for and fix any smoke tests that rely upon the Judge being offboarded or their chambers. This process leaves the Judge user active in environments relying on 'local' data (e.g. developer machines, CI pipeline), so other tests relying only on 'local' data should not be impacted.
5. Deploy the change. Deployment takes care of all offboarding in environments other than **test** and **prod**
6. Using the environment switcher, source `ustc-test`
2. Check for and fix any smoke tests that rely upon the Judge being offboarded or their chambers. This process leaves the Judge user active in environments relying on 'local' data (e.g. developer machines, CI pipeline), so other tests relying only on 'local' data should not be impacted.
3. Once you deploy to the environment, your changes will take effect.

### To Update the Judge User in Test
1. Using the environment switcher, source `ustc-test`
```
source ./scripts/env/set-env.zsh ustc-test
```
7. run `offboard-judge.sh`, passing in the user ID
2. Run `offboard-judge.sh`, passing in the user ID
```
./scripts/user/offboard-judge-user.sh {judgeUserId}
```
6. If you haven't already, open a PR against `staging` for this change. Apply the "Manual Deploy Step(s) Required" label and include a link to this documentation in the PR's description.
7. At this point, hand off to a USTC engineer.
8. Once this change is deployed to production, run `offboard-judge.sh` as above, but against production.

### To Update the Judge User in Prod
If you have access to prod, run the same script as above, but against production. If you do not have access, hand off to a USTC engineer to do so.

## Additional Resources
- The Judge's id can be retrieved like so:
Expand Down
Loading
Loading