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

2700 - Migration discrepancy problem #2703

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

raftmsohani
Copy link

@raftmsohani raftmsohani commented Sep 14, 2023

Summary of Changes

Provide a brief summary of changes
Pull request closes #2700 _

This PR resolves the migration discrepancy that happened in Sprint 80.

How to Test

The test can be done against two states:

  1. Fresh deployment: this can be tested against local dev environment. The app should run all migrations and the app shall run successfully
  2. Deployment against prod and staging. (Note: Staging had been checked and DB state was matching what we have in prod : Please see this for more information). As can be seen below, the PR was deployed successfully with no error message and the app is running.
Screenshot 2023-09-15 at 7 08 12 AM

The image below shows results from two commands.

The section on the top shows result from ./manage.py showmigrations search_indexes. This command compares the migration in DB against what is existing in local ~/app directory.

The lower part of screen shows the result of query from DB in shell.

Screenshot 2023-09-15 at 7 00 13 AM

Deliverables

Checklist of ACs:

  • App can runs successfully both locally and when deployed to Cloud.gov
  • App can be deployed to Staging instance without manipulating the migrations manually

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 14, 2023

Codecov Report

Merging #2703 (58e74be) into develop (8ec31f9) will decrease coverage by 0.69%.
Report is 36 commits behind head on develop.
The diff coverage is 92.75%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2703      +/-   ##
===========================================
- Coverage    92.99%   92.30%   -0.69%     
===========================================
  Files          219      234      +15     
  Lines         4482     5095     +613     
  Branches       385      442      +57     
===========================================
+ Hits          4168     4703     +535     
- Misses         242      310      +68     
- Partials        72       82      +10     
Flag Coverage Δ
dev-backend 92.02% <92.75%> (-0.82%) ⬇️
dev-frontend 93.59% <ø> (ø)

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

Files Changed Coverage Δ
tdrs-backend/tdpservice/scheduling/parser_task.py 66.66% <0.00%> (ø)
tdrs-frontend/src/components/Home/Home.jsx 100.00% <ø> (ø)
tdrs-backend/tdpservice/data_files/models.py 81.42% <50.00%> (-0.93%) ⬇️
tdrs-backend/tdpservice/parsers/models.py 92.30% <50.00%> (ø)
...-backend/tdpservice/search_indexes/admin/filter.py 53.33% <53.33%> (ø)
tdrs-backend/tdpservice/parsers/util.py 78.00% <71.05%> (-14.38%) ⬇️
...pservice/search_indexes/documents/document_base.py 71.42% <71.42%> (ø)
tdrs-backend/tdpservice/parsers/parse.py 86.22% <84.44%> (-9.07%) ⬇️
tdrs-backend/tdpservice/parsers/fields.py 86.36% <86.36%> (ø)
tdrs-backend/tdpservice/parsers/transforms.py 90.47% <90.47%> (ø)
... and 35 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 4d5ed4b...58e74be. Read the comment docs.

@raftmsohani raftmsohani mentioned this pull request Sep 15, 2023
31 tasks
Copy link

@jtimpe jtimpe left a comment

Choose a reason for hiding this comment

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

Tested by checking out the spring 78 tag, getting some data entered, and checking out develop again to reproduce the issue. Applying this change on top of the failure works great - thanks mo!

@andrew-jameson andrew-jameson merged commit bf2cf12 into develop Sep 20, 2023
10 checks passed
@andrew-jameson andrew-jameson deleted the 2700-Search-indexes-migration-prd-discrepancy branch September 20, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search-indexes migration prd discrepancy
5 participants