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

PR #5 for silent failure work - Add files to create a job to poll the upload status from lighthouse #20637

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pmclaren19
Copy link
Contributor

@pmclaren19 pmclaren19 commented Feb 5, 2025

Summary

This pr is the third pr to merge some of the work from #20105. The first pr that included the db changes was previously merged #20318. The second pr that added the model, factory, constants, helpers and vcr cassettes was also previously merged #20346. The third pr added evss files and changes for document upload and was also previously merged #20380. The fourth pr added lighthouse files and changes for document upload and was also previously merged #20453.

This pr does the following:

  • Created upload status polling job for EvidenceSubmissions
  • Created a upload_status_updater for updating the status and failure dates, acknowledgment dates, and deletion dates
  • Wrote unit tests for upload_status_updater, update_documents_status_service and document_status_polling_service
  • Updated Evidence Submission model to have scopes, and upload status state checker functions
  • Added acknowledgement_date, failed_date, and error_message to EvidenceSubmissions model
  • Created document_status_polling_service
  • Created update_documents_status_service to handle document batches and send them to upload_status_updater
  • Created factories for EvidenceSubmissions tests
  • Created VCR cassettes for polling responses

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing
  • If this work is behind a flipper:
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature?

Screenshots

Note: Optional

What areas of the site does it impact?

(Describe what parts of the site are impacted andifcode touched other areas)

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

@pmclaren19 pmclaren19 self-assigned this Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

1 Error
🚫 This PR changes 559 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, those exceeding
500 will not be reviewed, nor will they be allowed to merge. Please break this PR up into
smaller ones.

If you have reason to believe that this PR should be granted an exception, please see the
Submitting pull requests for approval - FAQ.

File Summary

Files

  • .github/CODEOWNERS (+5/-0)

  • app/sidekiq/lighthouse/evidence_submission_document_upload_polling_job.rb (+45/-0)

  • app/sidekiq/lighthouse/evidence_submissions/failure_notification_email_job.rb (+67/-0)

  • lib/lighthouse/benefits_documents/documents_status_polling_service.rb (+21/-0)

  • lib/lighthouse/benefits_documents/update_documents_status_service.rb (+30/-0)

  • lib/lighthouse/benefits_documents/upload_status_updater.rb (+59/-0)

  • lib/periodic_jobs.rb (+10/-11)

  • spec/lib/lighthouse/benefits_documents/update_documents_status_service_spec.rb (+58/-0)

  • spec/lib/lighthouse/benefits_documents/upload_status_updater_spec.rb (+112/-0)

  • spec/sidekiq/lighthouse/evidence_submission_document_upload_polling_job_spec.rb (+67/-0)

  • spec/sidekiq/lighthouse/evidence_submissions/failure_notification_email_job_spec.rb (+74/-0)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, *.md, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru, *.pdf
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@va-vfs-bot va-vfs-bot temporarily deployed to 100037-5th-pr-for-silent-failure-work/main/main February 5, 2025 20:34 Inactive
@pmclaren19 pmclaren19 changed the title add changes for polling job PR #5 for silent failure work - Add files to create a job to poll the upload status from lighthouse Feb 5, 2025
@va-vfs-bot va-vfs-bot temporarily deployed to 100037-5th-pr-for-silent-failure-work/main/main February 5, 2025 21:51 Inactive
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.

2 participants