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

Infinite FETCH_STTS #2720

Merged
merged 9 commits into from
Nov 7, 2023
Merged

Infinite FETCH_STTS #2720

merged 9 commits into from
Nov 7, 2023

Conversation

elipe17
Copy link

@elipe17 elipe17 commented Oct 3, 2023

Summary of Changes

  • Updated render/request cycle to manage number of requests sent state to avoid infinitely sending requests.
  • Added new error modal to inform user there are issues and that they should log out/log in to see if the issue persists.
    Pull request closes FETCH_STTS Infinite Request #2701

How to Test

  • Remove line 99 from docker-compose.yml in the backend folder.
cd tdrs-frontend && docker-compose up
cd tdrs-backend && docker-compose up
  1. Log in and get to the Request Access form.
  2. You should immediately see the modal displayed in the image below.
  3. Sign out and make sure you can sign out
  4. Sign back in and verify that you see the error modal again since the stt list still hasnt been populated in the db.
  5. exec into the backend container and run python manage.py populate_stts
  6. Go back to the Request Access form and verify that you don't get the error modal.

Deliverables

More details on how deliverables herein are assessed included here.

Deliverable 1: Accepted Features

Checklist of ACs:

  • FETCH_STTS should be executed a finite amount of times no matter the response.
  • If FETCH_STTS continuously has no response, an error indicating to the user the issue should be thrown.
  • Testing Checklist has been run and all tests pass
  • README is updated, if necessary

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

@elipe17 elipe17 self-assigned this Oct 3, 2023
@elipe17 elipe17 marked this pull request as ready for review October 3, 2023 16:21
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #2720 (3aaf5af) into develop (8ec31f9) will decrease coverage by 0.58%.
Report is 55 commits behind head on develop.
The diff coverage is 91.57%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2720      +/-   ##
===========================================
- Coverage    92.99%   92.41%   -0.58%     
===========================================
  Files          219      239      +20     
  Lines         4482     5366     +884     
  Branches       385      476      +91     
===========================================
+ Hits          4168     4959     +791     
- Misses         242      314      +72     
- Partials        72       93      +21     
Flag Coverage Δ
dev-backend 92.32% <92.15%> (-0.52%) ⬇️
dev-frontend 92.83% <80.64%> (-0.76%) ⬇️

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%> (ø)
tdrs-backend/tdpservice/data_files/serializers.py 100.00% <100.00%> (ø)
...rs-backend/tdpservice/data_files/test/factories.py 100.00% <100.00%> (ø)
tdrs-backend/tdpservice/data_files/validators.py 96.15% <ø> (ø)
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%> (ø)
... and 54 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 be8f196...3aaf5af. Read the comment docs.

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.

good work!

function STTComboBox({ selectStt, selectedStt, handleBlur, error }) {
const sttList = useSelector((state) => state?.stts?.sttList)
const sttReduction = useSelector((state) => state?.stts)
Copy link

Choose a reason for hiding this comment

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

minor point but i'd go with something like sttListRequest for the variable name to indicate what's present in the data structure rather than where in the redux stack it comes from

Copy link

@raftmsohani raftmsohani left a comment

Choose a reason for hiding this comment

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

LGTM!

@elipe17 elipe17 requested a review from ADPennington October 11, 2023 18:29
@elipe17 elipe17 added QASP Review a11y Accessibility/Section 508 and removed QASP Review labels Oct 11, 2023
@elipe17 elipe17 removed the request for review from ADPennington October 12, 2023 19:51
@elipe17 elipe17 added Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI and removed Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI labels Oct 12, 2023
@elipe17 elipe17 added the Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI label Oct 12, 2023
@elipe17 elipe17 added Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI and removed Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI labels Oct 17, 2023
Copy link

@reitermb reitermb left a comment

Choose a reason for hiding this comment

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

Looking great on the a11y front. Noting that I documented a related a11y issue (not introduced by this ticket) in #2735.

More documentation to be added following gov a11y sync tomorrow afternoon with @ttran-hub

cc @ADPennington

@elipe17 elipe17 requested a review from ADPennington October 24, 2023 18:32
@reitermb reitermb requested a review from ttran-hub October 24, 2023 20:09
@ADPennington ADPennington added Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI and removed Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI labels Nov 6, 2023
@ADPennington
Copy link
Collaborator

@elipe17 is there a way to test this in a deployed environment? also, can you get this deployed to a dev environment when you get a chance?

@elipe17 elipe17 added Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI and removed Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI labels Nov 6, 2023
@ttran-hub
Copy link
Collaborator

Looking great on the a11y front. Noting that I documented a related a11y issue (not introduced by this ticket) in #2735.

More documentation to be added following gov a11y sync tomorrow afternoon with @ttran-hub

cc @ADPennington

a11y LGTM, while potential reading behavior is introduced in #2735.

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.

sttcombo1
🚀

@ADPennington ADPennington added Ready to Merge and removed QASP Review Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI labels Nov 6, 2023
@andrew-jameson andrew-jameson merged commit fcd2a1d into develop Nov 7, 2023
20 checks passed
@andrew-jameson andrew-jameson deleted the 2701-infinite-fetch branch November 7, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FETCH_STTS Infinite Request
7 participants