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

DB-drop-and-reset-write-down #2710

Merged
merged 5 commits into from
Sep 28, 2023
Merged

Conversation

raftmsohani
Copy link

@raftmsohani raftmsohani commented Sep 21, 2023

Summary of Changes

Provide a brief summary of changes
Pull request closes #_

How to Test

List the steps to test the PR
These steps are generic, please adjust as necessary.

cd tdrs-frontend && docker-compose -f docker-compose.yml -f docker-compose.local.yml up -d
cd tdrs-backend && docker-compose -f docker-compose.yml -f docker-compose.local.yml up -d 
  1. Open http://localhost:3000/ and sign in.
  2. Proceed with functional tests as described herein.
  3. Test steps should be captured in the demo GIF(s) and/or screenshots below.

Demo GIF(s) and screenshots for testing procedure

Deliverables

More details on how deliverables herein are assessed included here.

Deliverable 1: Accepted Features

Checklist of ACs:

  • [insert ACs here]
  • lfrohlich and/or adpennington confirmed that ACs are met.

Deliverable 2: Tested Code

  • Are all areas of code introduced in this PR meaningfully tested?
    • If this PR introduces backend code changes, are they meaningfully tested?
    • If this PR introduces frontend code changes, are they meaningfully tested?
  • Are code coverage minimums met?
    • Frontend coverage: [insert coverage %] (see CodeCov Report comment in PR)
    • Backend coverage: [insert coverage %] (see CodeCov Report comment in PR)

Deliverable 3: Properly Styled Code

  • Are backend code style checks passing on CircleCI?
  • Are frontend code style checks passing on CircleCI?
  • Are code maintainability principles being followed?

Deliverable 4: Accessible

  • Does this PR complete the epic?
  • Are links included to any other gov-approved PRs associated with epic?
  • Does PR include documentation for Raft's a11y review?
  • Did automated and manual testing with iamjolly and ttran-hub using Accessibility Insights reveal any errors introduced in this PR?

Deliverable 5: Deployed

  • Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?

Deliverable 6: Documented

  • Does this PR provide background for why coding decisions were made?
  • If this PR introduces backend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces frontend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces dependencies, are their licenses documented?
  • Can reviewer explain and take ownership of these elements presented in this code review?

Deliverable 7: Secure

  • Does the OWASP Scan pass on CircleCI?
  • Do manual code review and manual testing detect any new security issues?
  • If new issues detected, is investigation and/or remediation plan documented?

Deliverable 8: User Research

Research product(s) clearly articulate(s):

  • the purpose of the research
  • methods used to conduct the research
  • who participated in the research
  • what was tested and how
  • impact of research on TDP
  • (if applicable) final design mockups produced for TDP development

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #2710 (9ee2832) into develop (8ec31f9) will decrease coverage by 0.25%.
Report is 39 commits behind head on develop.
The diff coverage is 92.48%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2710      +/-   ##
===========================================
- Coverage    92.99%   92.75%   -0.25%     
===========================================
  Files          219      235      +16     
  Lines         4482     5201     +719     
  Branches       385      452      +67     
===========================================
+ Hits          4168     4824     +656     
- Misses         242      290      +48     
- Partials        72       87      +15     
Flag Coverage Δ
dev-backend 92.57% <92.48%> (-0.27%) ⬇️
dev-frontend 93.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
tdrs-backend/tdpservice/core/logger.py 100.00% <100.00%> (ø)
...rs-backend/tdpservice/data_files/test/factories.py 100.00% <100.00%> (ø)
tdrs-backend/tdpservice/data_files/views.py 90.65% <100.00%> (+0.08%) ⬆️
tdrs-backend/tdpservice/email/email.py 76.78% <100.00%> (-1.55%) ⬇️
...vice/email/helpers/account_deactivation_warning.py 100.00% <100.00%> (ø)
...backend/tdpservice/email/helpers/account_status.py 84.84% <100.00%> (ø)
tdrs-backend/tdpservice/email/helpers/data_file.py 100.00% <100.00%> (ø)
tdrs-backend/tdpservice/parsers/admin.py 100.00% <100.00%> (ø)
...rs/migrations/0002_alter_parsererror_error_type.py 100.00% <ø> (ø)
...vice/parsers/migrations/0006_auto_20230810_1500.py 100.00% <100.00%> (ø)
... and 42 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c94b8f7...9ee2832. Read the comment docs.

# How to DROP existing DB and Recreate a fresh DB

### Connecting to DB service
First step is to connect to the instance DB (see [this](CloudFoundry-DB-Connection.md)).
Copy link
Collaborator

@andrew-jameson andrew-jameson Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just move this to a section within that document please? Otherwise good write up!

After connection to the DB is made (the step above will make a psql connection), then the following Postgres commands have to run:

1. List the DBs: `\l`
2. find the associated DB name with instance. E.g: `tdp_db_dev_qasp`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to have a section or command on how to take a backup/dump?

Copy link
Collaborator

@andrew-jameson andrew-jameson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address both feedback items I commented.

Copy link
Collaborator

@andrew-jameson andrew-jameson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM

@raftmsohani raftmsohani added raft review This issue is ready for raft review QASP Review labels Sep 27, 2023
Copy link
Collaborator

@ADPennington ADPennington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the demo @raftmsohani 🚀

@andrew-jameson andrew-jameson merged commit 8289c01 into develop Sep 28, 2023
12 checks passed
@andrew-jameson andrew-jameson deleted the DB-drop-and-reset-write-down branch September 28, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
raft review This issue is ready for raft review Ready to Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants