-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5385 from ustaxcourt/staging
merge staging into prod 09-20-2024
- Loading branch information
Showing
74 changed files
with
7,315 additions
and
4,360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
Oops, something went wrong.