Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
3edaffa
- add manual deployment option to circi docs
elipe17 May 20, 2025
b6678c2
- grammar change
elipe17 May 20, 2025
7ab5329
Merge branch 'develop' into circi-manual-deploy
elipe17 May 28, 2025
00c155f
Merge branch 'develop' into circi-manual-deploy
elipe17 Jul 7, 2025
76ebb50
Merge branch 'develop' into circi-manual-deploy
elipe17 Jul 7, 2025
2f620bb
Merge branch 'develop' into circi-manual-deploy
elipe17 Jul 14, 2025
02abc80
Merge branch 'develop' into circi-manual-deploy
elipe17 Jul 21, 2025
b48c0fa
Merge branch 'develop' into circi-manual-deploy
ADPennington Jul 29, 2025
2c3b9d3
Merge branch 'develop' into circi-manual-deploy
elipe17 Aug 5, 2025
75d18d8
Merge branch 'develop' into circi-manual-deploy
elipe17 Aug 28, 2025
7c76607
Merge branch 'develop' into circi-manual-deploy
elipe17 Aug 28, 2025
d5c26d6
Merge branch 'develop' into circi-manual-deploy
elipe17 Sep 30, 2025
ad5a3e3
Merge branch 'develop' into circi-manual-deploy
elipe17 Oct 6, 2025
e5e3e7f
Merge branch 'develop' into circi-manual-deploy
elipe17 Oct 17, 2025
8d4288e
Merge branch 'develop' into circi-manual-deploy
elipe17 Oct 20, 2025
cf808ca
Merge branch 'develop' into circi-manual-deploy
elipe17 Oct 30, 2025
40e82ea
Merge branch 'develop' into circi-manual-deploy
elipe17 Oct 31, 2025
82cf1de
Merge branch 'develop' into circi-manual-deploy
elipe17 Nov 5, 2025
c89fac9
Merge branch 'develop' into circi-manual-deploy
elipe17 Nov 6, 2025
c1aea98
Merge branch 'develop' into circi-manual-deploy
elipe17 Nov 7, 2025
7502290
Merge branch 'develop' into circi-manual-deploy
ADPennington Dec 3, 2025
1adb338
Merge branch 'develop' into circi-manual-deploy
elipe17 Jan 5, 2026
72fc26b
- Move reparse "finished_at" logic to the finally clause to encapsula…
elipe17 Jan 27, 2026
445a48f
- badcommit
elipe17 Jan 27, 2026
7532cb4
Revert "- badcommit"
elipe17 Jan 27, 2026
0e4b980
add test fixture
jtimpe Jan 28, 2026
4833e60
add new datafiles get endpoint filtering tests
jtimpe Jan 28, 2026
bf4bb5a
lint
jtimpe Jan 28, 2026
6d705fe
fix issue
jtimpe Jan 28, 2026
9e2bfa2
- Increase connection age setting to allow persistent connections bet…
elipe17 Jan 29, 2026
f595218
Merge branch 'develop' into 5474-reparse-spike
elipe17 Jan 29, 2026
140deba
is to ==
jtimpe Jan 30, 2026
1617d61
Merge branch 'develop' into 5477-datafile-get-filter-test
jtimpe Jan 30, 2026
338cff3
Merge branch 'develop' into 5474-reparse-spike
elipe17 Jan 30, 2026
da6037a
Merge branch 'develop' into circi-manual-deploy
ADPennington Feb 5, 2026
3a82064
Merge branch 'develop' into circi-manual-deploy
ADPennington Feb 5, 2026
a064e75
Merge branch 'develop' into circi-manual-deploy
ADPennington Feb 5, 2026
de775fe
- remove all refs to axios and axios instance
elipe17 Feb 6, 2026
608e66f
- fix warning about throwing object literal and not an error
elipe17 Feb 6, 2026
ad1adc3
- Boosting coverage
elipe17 Feb 6, 2026
0035f38
- linting
elipe17 Feb 9, 2026
951623d
Merge branch 'develop' into 3333-replace-axios-with-fetch
elipe17 Feb 9, 2026
e7e1905
- Update to use s3 storage
elipe17 Jan 26, 2026
9b879bf
- Updated NavItem to conditionally use anchor tags or react internal …
elipe17 Jan 8, 2026
1028f1a
- Update other extraneous anchor tags to be react links where possible
elipe17 Jan 8, 2026
245e89d
- Create new link component
elipe17 Jan 21, 2026
eb2797e
Add sprint summary report for 2025-10-21
kennymcnett Oct 22, 2025
e2a7473
Add sprint summary for 2025-11-04
kennymcnett Nov 7, 2025
3cc7677
Sprint summary 2025-10-07
kennymcnett Oct 17, 2025
d6ab962
Revise sprint summary with updated issue links
kennymcnett Oct 17, 2025
fcf86a7
Add files via upload
kennymcnett Oct 2, 2025
10727f7
Create sprint-132-summary.md
kennymcnett Sep 18, 2025
a34f8b8
don't include all a11y tests for every spec run
jtimpe Jan 16, 2026
cffcd10
improve datafiles page timing
jtimpe Jan 16, 2026
08f6f58
cache auth state between specs
jtimpe Jan 16, 2026
c09493f
rm missing ref
jtimpe Jan 20, 2026
ba6dc0e
health grafana dashboard not using proper job name for celery prometh…
mattcoleanderson Jan 8, 2026
42ac75e
prepend 'tdp-' to local celery prometheus job to match nonlocal env n…
mattcoleanderson Jan 8, 2026
588e643
export REDIS_URI using django settings so the celery_exporter can acc…
mattcoleanderson Jan 8, 2026
70fbf34
- Test using jq to get uri and quote uri when passing to executanles
elipe17 Jan 28, 2026
5446053
-updated so that open feedback widget accepts the submitted files as …
elipe17 Jan 21, 2026
f8e4076
- Created helper functions to validate textual dates
elipe17 Jan 15, 2026
59dcef0
- update description
elipe17 Jan 15, 2026
441acac
quick lint fix (#5607)
raftmsohani Jan 30, 2026
6734d73
- Add django admin interface as a dependency to get better 508 compli…
elipe17 Feb 3, 2026
0556a71
- add missing perms to tst
elipe17 Feb 5, 2026
514b530
- Updated storage backend to store the currently used s3 version id s…
elipe17 Jan 21, 2026
6590d44
- Update to make retrieving the version from the storage object threa…
elipe17 Jan 21, 2026
78ac2ec
- linting
elipe17 Jan 21, 2026
7e07c75
- Move version logic into custom field outside of the backends
elipe17 Jan 29, 2026
63d8b17
5597 Fix showing tribal STT (#5606)
raftmsohani Feb 3, 2026
cba0483
Add sprint summary for 2026-01-06
kennymcnett Jan 13, 2026
91504c4
Add sprint summary for 2025-12-16
kennymcnett Dec 17, 2025
53db85b
Revise sprint summary for Dec 03 - Dec 16, 2025
kennymcnett Dec 23, 2025
fc92b87
Add sprint summary for 2026-01-20
kennymcnett Jan 21, 2026
e80b821
Add sprint summary for 2025-12-02
kennymcnett Dec 3, 2025
d1c8920
Edit to sprint overview about the alert banner module
kennymcnett Dec 4, 2025
cfedf54
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
2642408
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
c2e5eb5
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
51a89cb
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
40299fe
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
4edf8be
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
51c6c85
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
3f2033e
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
52d3ad9
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
3273e66
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
cef950c
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
73f0d3a
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
bdf4e5c
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
8c1128a
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
133bc8a
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
8aede32
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
fd926c9
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
fd08c73
Add sprint summary for 2025-11-18
kennymcnett Nov 21, 2025
eba3eca
Add sprint summary for 2025-11-18
kennymcnett Nov 22, 2025
f724498
Add sprint summary for 2025-11-18
kennymcnett Nov 22, 2025
233d69f
Add sprint summary for 2025-11-18
kennymcnett Nov 22, 2025
557e33e
Add sprint summary for 2025-11-18
kennymcnett Nov 22, 2025
efdf495
Add sprint summary for 2025-11-18
kennymcnett Nov 22, 2025
0d0a61e
Add sprint summary for 2025-11-18
kennymcnett Nov 22, 2025
90f5b02
add local cache config
jtimpe Feb 10, 2026
91890ea
configure stts/alpha endpoint caching
jtimpe Feb 10, 2026
eb4ca0c
add cached feature flag endpoint
jtimpe Feb 10, 2026
72dc8bf
clear feature flag cache on model updates
jtimpe Feb 10, 2026
ee636f5
cloudgov cache settings
jtimpe Feb 10, 2026
48acde3
- Update task to use fiscal year and quarter since thats what datafil…
elipe17 Feb 10, 2026
379fcda
- remove unused import
elipe17 Feb 10, 2026
e53a3f1
- linting
elipe17 Feb 10, 2026
471eae6
- Update and add tests for email reminder logic
elipe17 Feb 10, 2026
77fe74d
- linting
elipe17 Feb 10, 2026
d17c43b
- Removed logic to disable submit button if there are no uploaded files
elipe17 Feb 10, 2026
d8a0419
- Add data tag for cypress tests to avoid the redux race issue
elipe17 Feb 10, 2026
3085299
add new processingAlert
mattcoleanderson Feb 10, 2026
f56d9d3
stop screen reader from interrupting alert message
mattcoleanderson Feb 10, 2026
033ef8f
reset processingAlert banner when file changes
mattcoleanderson Feb 10, 2026
9a96572
Merge branch 'develop' into 3333-replace-axios-with-fetch
elipe17 Feb 10, 2026
b0f0ff3
- linting
elipe17 Feb 10, 2026
fd00763
Merge branch 'develop' into 5598-restore-submit-button-accessibility
elipe17 Feb 10, 2026
c0cb0d2
- Update so that reparse success state is conditional
elipe17 Feb 11, 2026
052a609
Merge branch 'develop' into 5584-parsing-complete-banner-interrupts-s…
mattcoleanderson Feb 11, 2026
4dbeb14
parametrize datafile queryset filter test
jtimpe Feb 11, 2026
97de05e
lint
jtimpe Feb 11, 2026
27383a9
fix frontend tests
mattcoleanderson Feb 11, 2026
8eb9871
fix linting errors
mattcoleanderson Feb 11, 2026
5c1e142
Merge branch 'develop' into 5584-parsing-complete-banner-interrupts-s…
mattcoleanderson Feb 11, 2026
e1b6251
Merge branch 'develop' into 5477-datafile-get-filter-test
jtimpe Feb 11, 2026
9fc7c51
rm comments
jtimpe Feb 11, 2026
8ddb453
increase coverage
mattcoleanderson Feb 11, 2026
7247aca
class-ify datafile queryset test
jtimpe Feb 12, 2026
a48b901
Merge branch 'develop' into 5532-redis-cache
jtimpe Feb 12, 2026
c75eb79
lint
jtimpe Feb 12, 2026
9c8bd15
fix e2e
jtimpe Feb 13, 2026
cd3d59c
Merge branch 'develop' into 5532-redis-cache
jtimpe Feb 13, 2026
360f9e1
str concat celery db nums
jtimpe Feb 13, 2026
9d8f027
fix deploy
jtimpe Feb 13, 2026
119c593
proper dict iteration
jtimpe Feb 13, 2026
4d55295
rm default cache (interferes with static assets)
jtimpe Feb 13, 2026
71121be
add default locmemcache
jtimpe Feb 13, 2026
bbed733
- Refactor aggregates logic to avoid double counting errors for cases…
elipe17 Feb 13, 2026
0c17dac
- Add test case to prevent future regression
elipe17 Feb 13, 2026
5c4d2f3
update cache key prefix
jtimpe Feb 17, 2026
ff9aa62
- add comments clarifying what is going on
elipe17 Feb 17, 2026
4241712
fix comment
jtimpe Feb 17, 2026
ceec72c
fix authentication
jtimpe Feb 17, 2026
1e7ce7c
rm comment
jtimpe Feb 17, 2026
2ed6f1b
rm extra prefix
jtimpe Feb 17, 2026
aabad16
rm extra fields
jtimpe Feb 17, 2026
777625f
- linting
elipe17 Feb 18, 2026
bc57704
add detail endpoint
jtimpe Feb 18, 2026
4bbb425
rm comments
jtimpe Feb 18, 2026
c960c80
[2641] optimize/reorganize unit tests (#5608)
raftmsohani Feb 20, 2026
59a35d2
Merge branch 'develop' into 5477-datafile-get-filter-test
jtimpe Feb 23, 2026
71a0603
is to ==
jtimpe Feb 23, 2026
144686c
Merge pull request #5604 from raft-tech/5477-datafile-get-filter-test
jtimpe Feb 23, 2026
728a1fe
Merge branch 'develop' into 5584-parsing-complete-banner-interrupts-s…
mattcoleanderson Feb 24, 2026
e97242c
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Feb 24, 2026
0341a4f
- Fix test
elipe17 Feb 24, 2026
b73b239
Merge pull request #5627 from raft-tech/bug-double-counting-case-aggr…
elipe17 Feb 24, 2026
6793749
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Feb 24, 2026
c3d8c0e
- Update based on feedback
elipe17 Feb 24, 2026
f980636
- remove func
elipe17 Feb 24, 2026
e3fb6ac
Merge remote-tracking branch 'origin/develop' into 3333-replace-axios…
elipe17 Feb 24, 2026
231c10f
- Update feedback reports to use fetch instance
elipe17 Feb 24, 2026
6855d24
- Use regex to be a bit more bulletproof
elipe17 Feb 24, 2026
bda40bb
- linting
elipe17 Feb 24, 2026
5f79c64
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Feb 24, 2026
d56143e
Merge branch 'develop' into circi-manual-deploy
elipe17 Feb 24, 2026
b28505a
Merge pull request #5034 from raft-tech/circi-manual-deploy
elipe17 Feb 24, 2026
6e1fe5c
5525 Restart submission status polling page navigation (#5600)
raftmsohani Feb 24, 2026
a286c87
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Feb 24, 2026
bfd994e
- Fix missing result objects in fra tests
elipe17 Feb 24, 2026
e06c5ea
update to locmemcache for local default
jtimpe Feb 25, 2026
2f697d7
move get_redis_broker helper to utils and test
jtimpe Feb 25, 2026
3d2b2db
lint
jtimpe Feb 25, 2026
4bdbb9c
Merge branch 'develop' into 5584-parsing-complete-banner-interrupts-s…
mattcoleanderson Feb 25, 2026
c79c63c
Merge branch 'develop' into 5474-reparse-spike
elipe17 Feb 25, 2026
3f0bc10
failing tests after merging develop in
mattcoleanderson Feb 25, 2026
55adbb8
add test coverage
mattcoleanderson Feb 25, 2026
00ea63f
Merge branch 'develop' into 5598-restore-submit-button-accessibility
elipe17 Feb 26, 2026
9580d28
Merge branch 'develop' into bug-submission-reminder
elipe17 Feb 26, 2026
f5bcb45
Merge pull request #5601 from raft-tech/5474-reparse-spike
elipe17 Feb 26, 2026
698ab37
Merge branch 'develop' into 3333-replace-axios-with-fetch
elipe17 Feb 26, 2026
e438db3
create feature flag reducer
jtimpe Feb 27, 2026
3c9add7
add feature flag actions
jtimpe Feb 27, 2026
568249a
implement feature flag in fetchAuth
jtimpe Feb 27, 2026
6de008c
Merge branch 'develop' into 5540-feature-flag-redux
jtimpe Feb 27, 2026
d4a6628
Merge branch 'develop' into 5532-redis-cache
jtimpe Mar 2, 2026
b7f078d
Merge pull request #5612 from raft-tech/3333-replace-axios-with-fetch
elipe17 Mar 2, 2026
87843c0
Merge branch 'develop' into bug-submission-reminder
elipe17 Mar 2, 2026
73c2bc3
update response parsing
jtimpe Mar 2, 2026
9924939
update test
jtimpe Mar 2, 2026
6fddbf4
Merge branch 'develop' into 5540-feature-flag-redux
jtimpe Mar 2, 2026
c40f7be
change axios to get
jtimpe Mar 2, 2026
952cfa2
Merge branch 'develop' into 5532-redis-cache
jtimpe Mar 2, 2026
058ac85
fix test
jtimpe Mar 2, 2026
7242ba8
- Update alert so that grabs screen reader politely
elipe17 Mar 2, 2026
e1bab0b
- convert role back to alert
elipe17 Mar 2, 2026
cabd4ed
Merge pull request #5619 from raft-tech/bug-submission-reminder
elipe17 Mar 2, 2026
0425713
replace setLocalAlertState with setProcessingAlertState
mattcoleanderson Mar 2, 2026
4ac6723
Merge branch 'develop' into 5584-parsing-complete-banner-interrupts-s…
mattcoleanderson Mar 2, 2026
23bd482
- add time stamp object to cause re-render on update
elipe17 Mar 2, 2026
6a132bc
change featureFlags.featureFlags to featureFlags.flags
jtimpe Mar 2, 2026
0e7e806
rm log
jtimpe Mar 2, 2026
d2c730a
fix test
jtimpe Mar 2, 2026
6d17dd1
Merge branch 'develop' into 5598-restore-submit-button-accessibility
elipe17 Mar 2, 2026
997e958
Merge pull request #5620 from raft-tech/5598-restore-submit-button-ac…
elipe17 Mar 3, 2026
d5fb69b
Merge branch 'develop' into 5584-parsing-complete-banner-interrupts-s…
mattcoleanderson Mar 3, 2026
49cd8eb
fix failing tests after merge conflicts
mattcoleanderson Mar 3, 2026
88c814b
Merge pull request #5622 from raft-tech/5584-parsing-complete-banner-…
mattcoleanderson Mar 3, 2026
a4078ec
Merge branch 'develop' into 5532-redis-cache
jtimpe Mar 3, 2026
0080a8f
- Use actual regex operator instead of LIKE command
elipe17 Mar 3, 2026
c307baf
Merge pull request #5616 from raft-tech/5532-redis-cache
jtimpe Mar 3, 2026
cd408f4
Merge branch 'develop' into 5540-feature-flag-redux
jtimpe Mar 3, 2026
5778aff
Merge pull request #5648 from raft-tech/5540-feature-flag-redux
jtimpe Mar 4, 2026
1cc32d9
Merge branch 'develop' into bug-ssn-valid-logic
elipe17 Mar 4, 2026
7d8e0cd
Merge pull request #5652 from raft-tech/bug-ssn-valid-logic
elipe17 Mar 4, 2026
be5de0b
Merge pull request #636 from raft-tech/release/v4.14.0
ADPennington Mar 5, 2026
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
51 changes: 44 additions & 7 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3'
version: "3"

tasks:

gitcfg:
desc: Configure git
cmds:
Expand Down Expand Up @@ -61,7 +60,6 @@ tasks:
# 3) Apply all migrations to initialize the new database
- docker compose -f docker-compose.yml exec web sh -c "python manage.py migrate"


backend-restart:
desc: Restart backend web server
dir: tdrs-backend
Expand All @@ -84,7 +82,7 @@ tasks:
desc: Execute a manage.py command in the backend container."
dir: tdrs-backend
vars:
CMD: '{{.CMD}}'
CMD: "{{.CMD}}"
cmds:
- docker compose -f docker-compose.yml exec web sh -c "python manage.py {{.CMD}}"

Expand Down Expand Up @@ -112,6 +110,14 @@ tasks:
- task: backend-up
- docker compose -f docker-compose.yml exec web sh -c "python manage.py migrate"

backend-update:
desc: Rebuild backend image and apply migrations (no data wipe)
dir: tdrs-backend
cmds:
- task: create-network
- docker compose -f docker-compose.yml up -d --build
- docker compose -f docker-compose.yml exec web sh -c "python manage.py migrate"

backend-pytest:
desc: 'Run pytest in the backend container. E.g: task backend-pytest PYTEST_ARGS="tdpservice/test/ -s -vv"'
dir: tdrs-backend
Expand Down Expand Up @@ -230,6 +236,31 @@ tasks:
cmds:
- npm install

frontend-update:
desc: Rebuild frontend localdev image and install dependencies (no data wipe)
dir: tdrs-frontend
cmds:
- docker compose -f docker-compose.local.yml up -d --build tdp-frontend
- docker compose -f docker-compose.local.yml exec tdp-frontend sh -c "npm install"

frontend-test-local:
desc: Run frontend unit tests on host (watch-less)
dir: tdrs-frontend
cmds:
- CI=true npm run test

frontend-test-watch:
desc: Run frontend unit tests on host (watch)
dir: tdrs-frontend
cmds:
- npm run test

frontend-test-cov-local:
desc: Run frontend unit tests with coverage on host
dir: tdrs-frontend
cmds:
- npm run test:cov

frontend-test:
desc: 'Run frontend unit tests in docker (watch-less). E.g: task frontend-test JEST_ARGS="--testPathPattern=FeedbackReports"'
dir: tdrs-frontend
Expand Down Expand Up @@ -263,7 +294,7 @@ tasks:
cmds:
- export CYPRESS_TOKEN=local-cypress-token
- docker-compose exec web python manage.py delete_cypress_users -usernames new-cypress@teamraft.com cypress-admin@teamraft.com
- docker-compose exec web python manage.py loaddata cypress/users cypress/data_files cypress/regions
- docker-compose exec web python manage.py loaddata cypress/users cypress/data_files cypress/regions cypress/profile_editing_regions cypress/profile_editing_users

frontend-e2e-local:
desc: Run Cypress E2E tests locally (Cypress on host, app in docker)
Expand All @@ -276,10 +307,10 @@ tasks:
desc: Run k6 performance tests
dir: performance-tests
vars:
SCRIPT: '{{.SCRIPT}}'
SCRIPT: "{{.SCRIPT}}"
CYPRESS_TOKEN: '{{.CYPRESS_TOKEN | default "local-cypress-token"}}'
BASE_URL: '{{.BASE_URL | default "http://localhost:3000"}}'
SCENARIO: '{{.SCENARIO}}'
SCENARIO: "{{.SCENARIO}}"
cmds:
- k6 run -e BASE_URL={{.BASE_URL}} -e CYPRESS_TOKEN={{.CYPRESS_TOKEN}} -e SCENARIO={{.SCENARIO}} {{.SCRIPT}}

Expand All @@ -289,6 +320,12 @@ tasks:
- task: backend-up
- task: frontend-up

update-deps:
desc: Rebuild backend/frontend and apply dependency updates (no data wipe)
cmds:
- task: backend-update
- task: frontend-update

down:
desc: Stop both frontend and backend web servers
cmds:
Expand Down
11 changes: 9 additions & 2 deletions docs/Technical-Documentation/circle-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@
* Executors: build environments used for jobs
* Jobs: a collection of steps run on an executor
* Orbs: reusable code that can be imported in to circle config - similar to pip packages, etc
* We currently have 5 workflows:
* Automated workflows:
* `build-and-test`: Runs jobs `secrets-check`, `test-frontend` and `test-backend` on every commit
* `dev-deployment`: Deploys a PR to the dev space. Triggered by a GitHub action whenever one of the relevant deployment labels is assigned via an API call to Circle CI with the pipeline parameter `run_dev_deployment`.
* `nightly`: Runs every night at UTC midnight and performs an OWASP scan against the staging site for both backend and frontend then stores the results in Django using a Cloud Foundry task.
* `owasp-scan`: Runs an OWASP scan against the backend and frontend for a given PR. Triggered by a GitHub action whenever the `QASP Review` label is assigned via an API call to Circle CI with the pipeline parameter `run_owasp_scan`.
* `staging-deployment`: Deploys the main branch to the staging space in Cloud.gov. Triggered via merges to the branch `develop`.
* `staging-deployment`: Deploys the main branch to the staging space in Cloud.gov. Triggered via merges to the branch `main`.
* Manual deployment
* Select the desired branch from the branch dropdown on the CircleCI project page
* Click the "Trigger Pipeline" button
* Enter the `target_env`: e.g. `qasp`, `raft`, `a11y`
* Set `triggered` to true
* Set `run_dev_deployment` to true
* Click the `Run Pipeline` button

## How are environment variables supplied in CI?
We manually set some environment variables in the project settings for Circle CI. From there, they are used in several places:
Expand Down
1 change: 1 addition & 0 deletions scripts/apply-database-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ echo "Done."

if [[ $app == "tdp-backend-develop" || $space == "tanf-dev" ]]; then
echo "Applying e2e test data"
python manage.py populate_stts
python manage.py loaddata cypress/users cypress/data_files cypress/regions cypress/profile_editing_regions cypress/profile_editing_users
echo "Done."
fi
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/celery_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [[ $1 == "cloud" ]]; then
fi

# Celery worker config can be found here: https://docs.celeryq.dev/en/stable/userguide/workers.html#:~:text=The-,hostname,-argument%20can%20expand
celery -A tdpservice.settings worker --loglevel=INFO --concurrency=1 --max-tasks-per-child=1 -n worker1@%h & # tune -c ?
celery -A tdpservice.settings worker --loglevel=INFO --concurrency=1 --max-tasks-per-child=100 -n worker1@%h & # tune -c ?
sleep 5

# TODO: Uncomment the following line to add flower service when memory limitation is resolved
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/plg/grafana_views/generate_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def handle_field(field, formatted_fields, is_admin):
f''' --
-- Calculate if SSN is valid
CASE
WHEN "{field}" IS NOT NULL AND "{field}" !~ '{regex_str}' AND "{field}" LIKE '%[^0-9]%' THEN 1
WHEN "{field}" IS NOT NULL AND "{field}" ~ '^[0-9]{{9}}$' AND "{field}" !~ '{regex_str}' THEN 1
ELSE 0
END AS "SSN_VALID"'''.strip()
)
Expand Down
Empty file.
26 changes: 26 additions & 0 deletions tdrs-backend/tdpservice/common/test/test_util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""Test the common utils."""

import pytest

from tdpservice.common.util import get_cloudgov_broker_db_numbers


@pytest.mark.parametrize(
"env,expected",
[
# dev envs
("raft", {"celery": "0", "caches": {"stts": "1", "feature-flags": "2"}}),
("qasp", {"celery": "3", "caches": {"stts": "4", "feature-flags": "5"}}),
("a11y", {"celery": "6", "caches": {"stts": "7", "feature-flags": "8"}}),
# staging
("develop", {"celery": "0", "caches": {"stts": "1", "feature-flags": "2"}}),
("staging", {"celery": "3", "caches": {"stts": "4", "feature-flags": "5"}}),
# prod
("prod", {"celery": "0", "caches": {"stts": "1", "feature-flags": "2"}}),
],
)
@pytest.mark.django_db
def test_get_cloudgov_broker_db_numbers(env, expected):
"""Test redis broker db number generation for deployed envs."""
result = get_cloudgov_broker_db_numbers(env)
assert result == expected
32 changes: 32 additions & 0 deletions tdrs-backend/tdpservice/common/util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Utilities for the application."""


def get_cloudgov_broker_db_numbers(cloudgov_name):
"""
Get the appropriate redis broker db numbers for an environment.

Returns an object of {"celery": str, "caches": {"cache_name": str}}
"""
spaces = {
"dev": ["raft", "qasp", "a11y"],
"staging": ["develop", "staging"],
"prod": ["prod"],
}
cache_options = ["stts", "feature-flags"]

broker_nums = {}

for space, envs in spaces.items():
incr = 0

for env in envs:
celery = str(incr)
caches = {}
for c in cache_options:
incr += 1
caches[c] = str(incr)

broker_nums[env] = {"celery": celery, "caches": caches}
incr += 1

return broker_nums[cloudgov_name]
12 changes: 12 additions & 0 deletions tdrs-backend/tdpservice/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ def stt(region):
return stt


@pytest.fixture
def tribe_stt(region):
"""Return a Tribal STT."""
stt, _ = STT.objects.get_or_create(
name="Blackfeet Nation",
region=region,
stt_code="020",
type=STT.EntityType.TRIBE,
)
return stt


@pytest.fixture
def region():
"""Return a region."""
Expand Down
21 changes: 18 additions & 3 deletions tdrs-backend/tdpservice/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.core.cache import caches
from django.db import models
from django.db.models.signals import post_delete, post_migrate, post_save
from django.dispatch import receiver


class FeatureFlag(models.Model):
Expand All @@ -11,9 +14,9 @@ class FeatureFlag(models.Model):
class Meta:
"""Metadata."""

ordering = ['feature_name']
verbose_name = 'Feature Flag'
verbose_name_plural = 'Feature Flags'
ordering = ["feature_name"]
verbose_name = "Feature Flag"
verbose_name_plural = "Feature Flags"

feature_name = models.CharField(max_length=100, unique=True, db_index=True)
enabled = models.BooleanField(default=False)
Expand All @@ -28,6 +31,18 @@ def __str__(self) -> str:
return f"{self.feature_name} ({status})"


@receiver([post_delete, post_migrate, post_save], sender=FeatureFlag)
def clear_feature_flag_cache(sender, instance, **kwargs):
"""Invalidate the cache after any changes to feature flags.

This depends on the cache being separated by feature, so the entire cache can be deleted.
There are too many options for headers/cookies to determine the key programatically,
so we segment the different featuers into separate caches to be able to invalidate efficiently
"""
cache = caches["feature-flags"]
cache.clear()


"""Global permissions

Allows for the creation of permissions that are
Expand Down
20 changes: 20 additions & 0 deletions tdrs-backend/tdpservice/core/serializers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""Serialize core model data."""

from rest_framework import serializers

from tdpservice.core.models import FeatureFlag


class FeatureFlagSerializer(serializers.ModelSerializer):
"""FeatureFlag serializer."""

class Meta:
"""Metadata."""

model = FeatureFlag
fields = [
"feature_name",
"enabled",
"config",
"description",
]
Loading