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

v3.5.0.102 to prod #533

Merged
merged 160 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
5cae4fb
Final mile procedures and updates
victoriaatraft Apr 5, 2024
7388f80
Updating validators
victoriaatraft Apr 8, 2024
1ea3c8a
- update incorrect name
elipe17 Apr 8, 2024
e50de03
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Apr 8, 2024
ee11314
Merge branch 'friendlynamefixes2' of https://github.com/raft-tech/TAN…
elipe17 Apr 8, 2024
84e0965
- Fix merge conflicts and update tests
elipe17 Apr 8, 2024
1a27754
- fix lint
elipe17 Apr 8, 2024
7b6951e
Merge branch 'develop' into friendlynamefixes2
ADPennington Apr 9, 2024
a6bfd5e
Merge branch 'develop' into friendlynamefixes2
ADPennington Apr 10, 2024
6ab972a
Merge branch 'develop' into friendlynamefixes2
ADPennington Apr 11, 2024
61ec476
Merge branch 'develop' into friendlynamefixes2
ADPennington Apr 12, 2024
0fe6d97
- Re-added validators
elipe17 Apr 12, 2024
8cd6068
- remvoe trailing colon
elipe17 Apr 18, 2024
6e983aa
Updates to the friendly names
victoriaatraft Apr 24, 2024
025c4e7
Update t2.py
victoriaatraft Apr 25, 2024
300ffb6
t2.py linting fixes
victoriaatraft Apr 25, 2024
dbb1e23
clean option string util
jtimpe Apr 26, 2024
c45c6cb
add friendly name and item num to cat 2
jtimpe Apr 26, 2024
7c6e055
making a dummy change
elipe17 Apr 26, 2024
67362b5
Merge branch 'friendlynamefixes2' of https://github.com/raft-tech/TAN…
elipe17 Apr 26, 2024
992d503
Revert "making a dummy change"
elipe17 Apr 26, 2024
a978900
fix linting
jtimpe Apr 26, 2024
977a0e8
fix a couple tests
jtimpe Apr 26, 2024
ec5e682
Merge branch 'develop' into 2693-cat2-messaging-cleanup
jtimpe May 2, 2024
af563c8
add parens to friendly names
jtimpe May 2, 2024
01af1d2
lint
jtimpe May 2, 2024
1251b1a
Merge branch 'develop' into 2693-cat2-messaging-cleanup
jtimpe May 16, 2024
97aa0ef
fix tests
jtimpe May 16, 2024
ad87ab1
fix more tests
jtimpe May 16, 2024
c2c465f
fix merge duplication
jtimpe May 16, 2024
7713c20
Friendly Name Updates
victoriaatraft May 17, 2024
8c3a4a1
rewrote 54 job search
victoriaatraft May 17, 2024
261faf4
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
victoriaatraft May 17, 2024
d44eb3e
finished resolving conflicts
victoriaatraft May 17, 2024
f19bb83
updated test_api.py
victoriaatraft May 17, 2024
c0fdd59
Merge branch 'develop' into 2693-cat2-messaging-cleanup
jtimpe May 20, 2024
68789c3
fix tests
jtimpe May 20, 2024
06677a0
lint
jtimpe May 20, 2024
484b655
corrected message
victoriaatraft May 20, 2024
2ca2b17
updated friendly names
victoriaatraft May 20, 2024
89ea962
Merge branch 'develop' into friendlynamefixes2
victoriaatraft May 20, 2024
dabda09
Merge branch 'develop' into 2693-cat2-messaging-cleanup
ADPennington May 20, 2024
55a35ef
Merge branch 'develop' into 2693-cat2-messaging-cleanup
ADPennington May 20, 2024
d781700
Merge branch 'develop' into 2693-cat2-messaging-cleanup
ADPennington May 21, 2024
f3f8fbc
- getting test case back its expected state
elipe17 May 21, 2024
543e321
Merge branch 'develop' into friendlynamefixes2
elipe17 May 21, 2024
7859cc5
Merge branch 'develop' into 2693-cat2-messaging-cleanup
jtimpe May 22, 2024
9a96a93
fix tets
jtimpe May 22, 2024
725a959
udpate required validator
jtimpe May 29, 2024
81f17ed
Merge branch 'develop' into 2693-cat2-messaging-cleanup
jtimpe May 29, 2024
3ac7d5f
add upcoming data deadline notification
jtimpe Jun 2, 2024
24bceb9
lint
jtimpe Jun 2, 2024
fd351e3
query efficiency
jtimpe Jun 3, 2024
c34dd04
query efficiency
jtimpe Jun 3, 2024
cb8b37a
clarity comment
jtimpe Jun 3, 2024
e1296c7
add no recips logentry
jtimpe Jun 3, 2024
29bc669
rm comments
jtimpe Jun 3, 2024
5c52b06
update email subject to include ssp/tanf
jtimpe Jun 3, 2024
9d9b141
SSP -> TANF and SSP
jtimpe Jun 3, 2024
3be46db
query efficiency
jtimpe Jun 4, 2024
799ce28
Merge branch 'develop' into 2693-cat2-messaging-cleanup
jtimpe Jun 5, 2024
49246f5
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Jun 5, 2024
b49202f
merge develop
jtimpe Jun 5, 2024
20021d4
fix tests
jtimpe Jun 5, 2024
e2f13fa
fix test
jtimpe Jun 5, 2024
2894cd6
Merge branch 'develop' into friendlynamefixes2
reitermb Jun 5, 2024
b0a605e
Merge branch 'develop' into 2693-cat2-messaging-cleanup
ADPennington Jun 6, 2024
459389c
Merge branch 'develop' into 2473-data-submission-notification
raftmsohani Jun 6, 2024
144e99b
Merge branch 'develop' into 2473-data-submission-notification
jtimpe Jun 11, 2024
6c50bdc
abs import
jtimpe Jun 11, 2024
cb82c56
move calendar_to_fiscal to util
jtimpe Jun 11, 2024
dd65bbe
fix tests
jtimpe Jun 11, 2024
2cfcfb3
lint
jtimpe Jun 11, 2024
884da8e
pass error_context_format for different formatting cat 3 messages
jtimpe Jun 12, 2024
1ecc38c
create ValidationErrorArgs dto
jtimpe Jun 14, 2024
a67c232
fix test
jtimpe Jun 14, 2024
887c170
lint
jtimpe Jun 14, 2024
ac6e00c
Merge branch 'develop' into 2473-data-submission-notification
jtimpe Jun 18, 2024
c0e95bd
- Updated stt filter to display stt name instead of code to make it e…
elipe17 Jun 18, 2024
b12c695
- Remove custom filter in favor of dependency
elipe17 Jun 20, 2024
9a44080
- update doc string
elipe17 Jun 20, 2024
b829bcd
- fix lint
elipe17 Jun 20, 2024
6e3c57b
Merge branch 'develop' into 3002-dac-filtering
elipe17 Jun 20, 2024
a1589e2
- Updated fiscal year filter to not list `All` twice
elipe17 Jun 21, 2024
3b0a1b8
rm comment
jtimpe Jun 24, 2024
64c3b9f
Merge branch 'develop' into 2693-cat2-messaging-cleanup
ADPennington Jun 26, 2024
6197661
Merge branch 'develop' into 3002-dac-filtering
elipe17 Jun 27, 2024
4c5ae11
Merge branch 'develop' into 3002-dac-filtering
elipe17 Jun 27, 2024
b95fb9f
Merge branch 'develop' into 2693-cat2-messaging-cleanup
jtimpe Jun 27, 2024
94e93f5
Merge branch '2693-cat2-messaging-cleanup' into fix/cat3-error-cleanup
jtimpe Jun 27, 2024
640fe34
fix tests
jtimpe Jun 27, 2024
89c0f2d
fix lint
jtimpe Jun 27, 2024
c292671
Merge branch '2693-cat2-messaging-cleanup' into fix/cat3-error-cleanup
jtimpe Jun 27, 2024
fb0e539
lint
jtimpe Jun 27, 2024
689e213
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Jun 28, 2024
637bb0e
- Updated tests to use new friendly names
elipe17 Jul 1, 2024
ef666a0
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Jul 2, 2024
1fd0aa3
Update tdrs-backend/tdpservice/parsers/schema_defs/ssp/m6.py
elipe17 Jul 2, 2024
4e530df
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t2.py
elipe17 Jul 2, 2024
49a311b
- remove 19
elipe17 Jul 2, 2024
ca40042
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t6.py
elipe17 Jul 2, 2024
ce38703
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t6.py
elipe17 Jul 2, 2024
6238578
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t6.py
elipe17 Jul 2, 2024
5a1a020
Update tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t6.py
elipe17 Jul 2, 2024
ac537a8
Update tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t6.py
elipe17 Jul 2, 2024
3c47847
Update tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t6.py
elipe17 Jul 2, 2024
d85d137
Update tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t6.py
elipe17 Jul 2, 2024
d53d4f6
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py
elipe17 Jul 2, 2024
a5eb48d
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py
elipe17 Jul 2, 2024
ba06506
- revert debug comment
elipe17 Jul 2, 2024
080a2da
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py
elipe17 Jul 2, 2024
0f49dea
- revert validator changes
elipe17 Jul 2, 2024
111628e
Update tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t2.py
elipe17 Jul 2, 2024
152d858
Merge branch 'friendlynamefixes2' of https://github.com/raft-tech/TAN…
elipe17 Jul 2, 2024
ea27763
- Fixing unresolved merge conflict
elipe17 Jul 2, 2024
a93705b
- resolved merge conflicts causing failure
elipe17 Jul 2, 2024
1b706e6
- resolve merge conflict causing failure
elipe17 Jul 2, 2024
042c29f
Merge branch 'develop' into 2473-data-submission-notification
ADPennington Jul 2, 2024
8a0d217
Merge branch 'develop' into 3002-dac-filtering
ADPennington Jul 2, 2024
4e28533
2693 cat2 messaging cleanup (#2963)
jtimpe Jul 3, 2024
001873d
2687 Added email text for sendgrid (#3050)
raftmsohani Jul 3, 2024
bf1ad61
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t5.py
victoriaatraft Jul 3, 2024
8cc001d
Update t3.py
victoriaatraft Jul 5, 2024
cf1c19f
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Jul 5, 2024
b15077c
- resolved merge conflicts
elipe17 Jul 5, 2024
ad44051
Merge branch 'friendlynamefixes2' of https://github.com/raft-tech/TAN…
elipe17 Jul 5, 2024
880f13b
- fixed failing tests
elipe17 Jul 5, 2024
c39438a
- Added missing territories
elipe17 Jul 5, 2024
d8fcc54
Merge branch 'develop' into 3002-dac-filtering
elipe17 Jul 5, 2024
410ce8f
Merge pull request #3037 from raft-tech/3002-dac-filtering
elipe17 Jul 8, 2024
9fd2568
Merge branch 'develop' into 2473-data-submission-notification
jtimpe Jul 8, 2024
b36ccf3
Merge branch 'develop' into fix/cat3-error-cleanup
jtimpe Jul 8, 2024
9b76e21
fix confl
jtimpe Jul 8, 2024
1c15c36
lint
jtimpe Jul 8, 2024
63492d1
Updated mp3.py
victoriaatraft Jul 9, 2024
3af861b
- fixed missed comma error
elipe17 Jul 9, 2024
ed43b9c
Merge branch 'develop' into friendlynamefixes2
elipe17 Jul 9, 2024
de09be4
- fixed issues
elipe17 Jul 11, 2024
2f2bcbe
Merge pull request #2931 from raft-tech/friendlynamefixes2
elipe17 Jul 11, 2024
afd1e63
Upgrade Postgres to v15.x (#3066)
elipe17 Jul 12, 2024
45db54a
Merge branch 'develop' into 2473-data-submission-notification
ADPennington Jul 15, 2024
ed8f67e
dynamic url to email template
jtimpe Jul 16, 2024
57ca5f6
no-reply language change
jtimpe Jul 16, 2024
3c36b81
3025 As an STT user, I need an accurate error report when I space-fil…
raftmsohani Jul 16, 2024
2618dd6
turn down log sensitivity in dev
jtimpe Jul 16, 2024
752d7ab
Merge branch 'develop' into 2473-data-submission-notification
jtimpe Jul 16, 2024
05dbc46
email reply language
jtimpe Jul 16, 2024
b2b3356
Merge pull request #3018 from raft-tech/2473-data-submission-notifica…
jtimpe Jul 16, 2024
70e37b3
Merge branch 'develop' into fix/cat3-error-cleanup
jtimpe Jul 16, 2024
d532be0
fix tests
jtimpe Jul 16, 2024
d519b03
fix tests
jtimpe Jul 16, 2024
5431881
test
jtimpe Jul 16, 2024
66542e8
2950 updated search index (#2964)
raftmsohani Jul 16, 2024
3dce21b
Merge branch 'develop' into fix/cat3-error-cleanup
ADPennington Jul 16, 2024
ff50f9e
Create sprint-101-summary.md (#3052)
robgendron Jul 16, 2024
7f3999e
Merge branch 'develop' into fix/cat3-error-cleanup
ADPennington Jul 16, 2024
e29f07c
remove extraneous item names
jtimpe Jul 17, 2024
e9c02c8
lint
jtimpe Jul 17, 2024
fd5042e
Merge pull request #3032 from raft-tech/fix/cat3-error-cleanup
jtimpe Jul 17, 2024
b142ae9
Merge pull request #530 from raft-tech/release/v3.5.0-Sprint-102
ADPennington Jul 31, 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
87 changes: 87 additions & 0 deletions docs/Sprint-Review/sprint-101-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# sprint-101-summary

6/5/2024 - 6/18/2024

**Dev:**

_**Prioritized DAC and Notifications Work**_ 

* As sys admin, I want to be able to reparse datafile sets #2978
* As a software engineer, I want to be able to test django-admin-508 #3008
* As tech lead, I need the STT filter for search\_indexes to be updated #2950
* As a data analyst I want to be notified of approaching data deadlines #2473
* add `SENDGRID_API_KEY` to deploy.backend.sh #2677
* Implement (small) data lifecycle (backup/archive ES) #3004
* As a developer I want to test django-508 repo #2980\


**DevOps:**

_**Successful deployments across environments and pipeline stability investments**_

* Application health monitoring #831

**Design:**

_**Close out error guide work, coordinate with dev on a plan for Cat 3 problems introduced by Cat 2 work, support spec-writing for upcoming work, and continued error audit dev ticket refinement.**_

* Error Report Guide #2847 is going through final edits 
* Walk-on Dear Colleague letter link update to this PR (or spin up a separate ticket if deployment of the letter to OFA's website doesn't align to this)
* Deliver spec for #3014 (Blanked-out values in Submission History)
* \#3021 Updated KC Release Notes & Update Indicator FAQ - stretch goal for this sprint
* Write follow-on / spec tickets from #2909 findings - stretch/ongoing lift
* Category 3 error messages clean-up #2792 - stretch/ongoing lift

## Tickets

### Completed/Merged

* [#2980 As a developer I want to test django-508 repo](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2980)
* [#2892 Correct misleading error message for unaligned reporting year/q against header year/q](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2892)
* [#2909 \[Research Spike\] OOtB OFA Kibana Experience & DIGIT Data Access](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2909)
* [#2991 As tech lead, I need the sftp file transfer feature to be deprecated](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2991)
* [#2847 \[Design Deliverable\] Error Report Knowledge Center Explainer](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2847)
* [#3024 2897 follow-on for a11y-related enhancement ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3024)
* [#2897 As a data analyst I want finalized language and guidance resources in Submission History & Error Reports ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2897)

### Submitted (QASP Review, OCIO Review)

* [#2133 \[Dev\] Enhancement for Request Access form (Tribe discoverability) ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2133)
* [#3023 as STT approved user, I need my IP address whitelisted so i can access TDP](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3023)
* [#3000 \[Design Deliverable\] TDP Poster for summer 2024 conferences](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3000)
* [#2795 As tech lead, I need TDP to detect duplicate records within a file and not store them in the db. ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2795)
* [#2693 \[Error Audit\] Category 2 error messages clean-up ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2693)
* [#2801 Friendly name cleanup ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2801)
* [#2883 Pre-Made Reporting Dashboards on Kibana](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2883)
* [#3021 \[Design Deliverable\] Updated KC Release Notes & Update Indicator FAQ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3021)
* [#2954 Extend SESSION\_COOKIE\_AGE](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2954)

### Ready to Merge

*

### Closed (Not Merged)

* [#2491 Create root-level docker-compose configuration file(s)](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2491)
* [#1690 As a system admin, I need a way to be redirected to frontend from DAC](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/1690)
* [#2351 As a user I want to be notified when the files are being scanned or uploaded when I push upload button](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2351)
* [#2591 Allow `manage.py` commands to be run by circleci](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2591)

### Moved to Next Sprint 

**In Progress** 

* [#3004 Implement (small) data lifecycle (backup/archive ES)](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3004)
* [#831 \[Spike\] As a Tech Lead, I want to get alerts when there is a backend or frontend error that affects an STT user ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/831)
* [#2978 As sys admin, I want to be able to reparse datafile sets](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2978)

#### Blocked

*

**Raft Review**

* [#2950 As tech lead, I need the STT filter for search\_indexes to be updated ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2950)
* [#3008 As a software engineer, I want to be able to test django-admin-508](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3008)
* [#3016 Spike - Cat2 Validator Improvement](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3016)
* [#2473 As a data analyst I want to be notified of approaching data deadlines](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2473)
120 changes: 120 additions & 0 deletions docs/Technical-Documentation/cloud-foundry-db-upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Cloud Foundry, Cloud.gov AWS RDS Database Upgrade

## Process

If you are performing this process for the staging or production, you need to ensure you are performing the changes through the [HHS](https://github.com/HHS/TANF-app) repo and not the [Raft](https://github.com/raft-tech/TANF-app) repo.
<br/>

### 1. SSH into a backend app in your desired environment
```bash
cf ssh tdp-backend-<APP>
```
<br/>

### 2. Create a backup of all the databases in the ENV's RDS instance
Note: you can get the required field values from `VCAP_SERVICES`.
```bash
/home/vcap/deps/0/apt/usr/lib/postgresql/<CURRENT VERSION>/bin/pg_dump -h <HOST> -p <PORT> -d <DB_NAME> -U <DB_USER> -F c --no-acl --no-owner -f <FILE_NAME>.pg
```
<br/>

### 3. Copy the backup(s) to your local machine
Note: This assumes you ran the backup command above in the home directory of the app. As an added bonus for later steps, you should execute this command from somewhere within `tdrs-backend` directory! Make sure not to commit the files/directories that are copied to your local directory.
```bash
cf ssh tdp-backend--<APP> -c 'tar cfz - ~/app/*.pg' | tar xfz - -C .
```
<br/>

### 4. Verify backup file size(s) match the backup size(s) in the app
```bash
ls -lh <PWD>/home/vcap/app
```
As an added verification step, you should consider restoring the backups into a local server and verifying the contents with `psql` or `pgAdmin`.
<br/><br/>

### 5. Update the `version` key in the `json_params` item in the `database` resource in the `main.tf` file in the environment(s) you're upgrading with the new database server version
```yaml
json_params = "{\"version\": \"<NEW VERSION>\"}"
```
<br/>

### 6. Update the `postgresql-client` version to the new version in `tdrs-backend/apt.yml`
```yaml
- postgresql-client-<NEW VERSION>
```
Note: if the underlying OS for CloudFoundry is no longer `cflinuxfs4` you may also need to update the repo we point to for the postgres client binaries.
<br/><br/>

### 7. Update the postgres container version in `tdrs-backend/docker-compose.yml`
```yaml
postgres:
image: postgres:<NEW VERSION>
```
<br/>

### 8. Update Terraform state to delete then re-create RDS instance
Follow the instuctions in the `terraform/README.md` and proceed from there. Modify the `main.tf` file in the `terraform/<ENV>` directory to inform TF of the changes. To delete the existing RDS instance you can simply comment out the whole database `resource` in the file (even though you made changes in the steps above). TF will see that the resource is no longer there, delete it, and appropriately update it's state. Then you simply re-comment the database `resource` back in with the changes you made in previous steps. TF will create the new RDS instance with your new updates, and also update the state in S3.
<br/><br/>

### 9. Bind backend to the new RDS instance to get credentials
```bash
cf bind-service tdp-backend-<APP> tdp-db-<ENV>
```
Be sure to re-stage the app when prompted
<br/><br/>

### 10. Apply the backend manifest to begin the restore process
If you copied the backups as mentioned in the note from step 3, the backups will be copied for you to the app instance in the command below. If not, you will need to use `scp` to copy the backups to the app instance after running the command below.
```bash
cf push tdp-backend-<APP> --no-route -f manifest.buildpack.yml -t 180 --strategy rolling
```
<br/>

### 11. SSH into the app you just pushed
```bash
cf ssh tdp-backend-<APP>
```
<br/>

### 12. Create the appropriate database(s) in the new RDS server
Note: you can get the required field values from `VCAP_SERVICES`.
```bash
/home/vcap/deps/0/apt/usr/lib/postgresql/<NEW VERSION>/bin/createdb -U <DB_USER> -h <HOST> <DB_NAME>
```
<br/>

### 13. Restore the backup(s) to the appropriate database(s)
Note: you can get the required field values from `VCAP_SERVICES`.
```bash
/home/vcap/deps/0/apt/usr/lib/postgresql/<NEW VERSION>/bin/pg_restore -p <PORT> -h <HOST> -U <DB_USER> -d <DB_NAME> <FILE_NAME>.pg
```
During this step, you may see errors similar to the message below. Note `<DB_USER>` is imputed in the message to avoid leaking environment specific usernames/roles.
```bash
pg_restore: from TOC entry 215; 1259 17313 SEQUENCE users_user_user_permissions_id_seq <DB_USER>
pg_restore: error: could not execute query: ERROR: role "<DB_USER>" does not exist
Command was: ALTER TABLE public.users_user_user_permissions_id_seq OWNER TO <DB_USER>;
```
and the result and total amount of these errors should be:
```bash
pg_restore: warning: errors ignored on restore: 68
```
If this is what you see, everything is OK. This happens because the `pg_dump` doesn't remove owner associations on sequences for some reason. But you will see in the blocks above that `pg_restore` correctly alters the sequence owner to the new database user.
<br/><br/>

### 14. Use `psql` to get into the database to check state
Note: you can get the required field values from `VCAP_SERVICES`.
```bash
/home/vcap/deps/0/apt/usr/lib/postgresql/<NEW VERSION>/bin/psql <RDS URI>
```
<br/>

### 15. Re-deploy or Re-stage the backend and frontend apps
Pending your environment you can do this GitHub labels or you can re-stage the apps from Cloud.gov.
<br/><br/>

### 16. Access the re-deployed/re-staged apps and run a smoke test
- Log in
- Submit a few datafiles
- Make sure new and existing submission histories populate correctly
- Checkout the DACs data
<br/>
1 change: 1 addition & 0 deletions tdrs-backend/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ django-configurations = "==2.2"
django-cors-headers = "==3.12.0"
django-extensions = "==3.1.3"
django-filter = "==21.1"
django-more-admin-filters = "==1.8"
django-model-utils = "==4.1.1"
django-storages = "==1.12.3"
django-unique-upload = "==0.2.1"
Expand Down
Loading