-
Notifications
You must be signed in to change notification settings - Fork 4
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
Backend/755/rename reports #1160
Conversation
… backend/755/rename_reports
…ackend/755/rename_reports"
@@ -13,10 +16,12 @@ class Migration(migrations.Migration): | |||
("stts", "0002_auto_20200923_1809"), | |||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | |||
] | |||
replaces = [('reports','0001_initial')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great find here! This looks like a great way to both retain the history and ensure a stable migration path on deployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some trouble testing this locally, but I think its due to the fact that the postgres contents are wiped on docker restarts and the Django server needs to be restarted to load in the code changes. I was able to run through the listed steps and confirmed the table was updated, but when I loaded the Django admin the server was still running code pointing to ReportFile
so I got an error trying to view the migrated models. It may be easier to test that path on the deployed site, but there are some conflicts on this PR which prevents it from getting the latest changes from master related to S3 configurations and the deployed sites no longer have AWS credentials set under the old environment variable names.
@@ -29,7 +29,7 @@ | |||
path("auth_check", AuthorizationCheck.as_view(), name="authorization-check"), | |||
path("", include("tdpservice.users.urls")), | |||
path("stts/", include("tdpservice.stts.urls")), | |||
path("reports/", include("tdpservice.reports.urls")), | |||
path("data_files/", include("tdpservice.data_files.urls")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we'll need to at least update the frontend Redux actions to make axios calls to this URL instead to prevent 404 errors on the client side.
Renaming the rest of the frontend files would be out of scope for this issue and should be tracked with #1132
Co-authored-by: John Willis <jtwillis92@gmail.com>
…backend/755/rename_reports
Codecov Report
@@ Coverage Diff @@
## raft-tdp-main #1160 +/- ##
==============================================
Coverage 98.14% 98.14%
==============================================
Files 38 38
Lines 917 917
Branches 42 42
==============================================
Hits 900 900
Misses 12 12
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtwillis92 You mentioned in another comment to address these issues in another pr? #1132? I understand not wanting to merge this till then, so what should we do? |
My apologies, I meant in that other comment to address renaming the rest of the frontend code as part of a follow on PR. For this PR we should be able to move it forward by only updating the URLs used in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested locally with no issues on either side!
tdrs-backend/tdpservice/data_files/migrations/0009_update_log_entry_content_type.py
Outdated
Show resolved
Hide resolved
dependencies = [ | ||
('reports', '0002_auto_20201215_1932'), | ||
('data_files', '0002_auto_20201215_1932'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not directly related to this PR or anything; we should probably rename the more unreadable migration files at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested this locally with no issues 👍
…entry_content_type.py Co-authored-by: John Willis <jtwillis92@gmail.com>
@riatzukiza test results 👍🏾 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@riatzukiza thanks 👍🏾 @abottoms-coder this is ready to merge. note the reference to a codecov finding below worth further research re: if this is a problem.
Deliverable 1: Accepted Features
Performance Standard(s): At the beginning of each sprint, the Product Owner and development team will collaborate to define a set of user stories to be completed during the sprint. Acceptance criteria for each story will also be defined. The development team will deliver code and functionality to satisfy these user stories.
Acceptable Quality Level: Delivered code meets the acceptance criteria for each user story. Incomplete stories will be assessed and considered for inclusion in the next sprint.
- Look up the acceptance criteria in the related issue; paste ACs below in checklist format.
- Check against the criteria:
- All references in code to reports are changed to data_files
- Database tables and fields are updated so any reference to report or reports are changed to data_file and data_files respectively.
- Testing Checklist has been run and all tests pass
As Product Owner, @lfrohlich will decide if ACs are met.
Deliverable 2: Tested Code
Performance Standard(s): Code delivered under the order must have substantial test code coverage. Version-controlled HHS GitHub repository of code that comprises products that will remain in the government domain.
Acceptable Quality Level: Minimum of 90% test coverage of all code. All areas of code are meaningfully tested.
- Are all areas of code introduced in this PR meaningfully tested?
- If this PR introduces backend code changes, are they meaningfully tested?
- Frontend coverage: ___ (see https://github.com/raft-tech/TANF-app README coverage dashboard)
- Backend coverage: ___ (see https://github.com/raft-tech/TANF-app README coverage dashboard)
i did notice an interesting codecov alert worth looking into cc: @abottoms-coder @riatzukiza
Deliverable 3: Properly Styled Code
Performance Standard(s): GSA 18F Front- End Guide
Acceptable Quality Level: 0 linting errors and 0 warnings
- Are backend code style checks passing on CircleCI?
- Are frontend code style checks passing on CircleCI?
Deliverable 4: Accessible
n/a
Deliverable 5: Deployed
Performance Standard(s): Code must successfully build and deploy into the staging environment.
Acceptable Quality Level: Successful build with a single command
- Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?
Deliverable 6: Documented
Performance Standard(s): Summary of user stories completed every two weeks. All dependencies are listed and the licenses are documented. Major functionality in the software/source code is documented, including system diagram. Individual methods are documented inline in a format that permits the use of tools such as JSDoc. All non-inherited 800-53 system security controls are documented in the Open Control or OSCAL format and HHS Section 508 Product Assessment Template (PAT) are updated as appropriate.
Acceptable Quality Level: Combination of manual review and automated testing, if available
- If this PR introduces backend code, is that code documented both inline and overall?
Deliverable 7: Secure
Performance Standard(s): Open Web Application Security Project (OWASP) Application Security Verification Standard 3.0
Acceptable Quality Level: Code submitted must be free of medium- and high-level static and dynamic security vulnerabilities
- Does the OWASP Scan pass on CircleCI?
- Do manual code review and manual testing detect any security issues?
no new issues
Summary of Changes
resolves #755
How to Test
docker system prune -a
to start from a clean slateraft-tdp-main
, spin up the backend and make a new user and upload a few data filesdocker-compose run web sh -c 'python manage.py migrate'
docker-compose restart web
to only restart the django containerDeliverable 1: Accepted Features
As facilitator/product manager, @kniz-raft will decide if ACs are met from Raft's perspective.
Deliverable 2: Tested Code
Deliverable 3: Properly Styled Code
Deliverable 4: Accessible
Deliverable 5: Deployed
Deliverable 6: Documented
Deliverable 7: Secure