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

[SIMPLE_FORMS] feat: form remediation solution streamlining, test coverage, and documentation - PART 6 #18778

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

Conversation

pennja
Copy link
Contributor

@pennja pennja commented Oct 7, 2024

Summary

This solution is designed to remediate form submissions which have failed submission and are over two weeks old. It is composed of several Ruby on Rails service objects which interact with each other.

The primary use-case for this solution is for form remediation. This process consists of the following:

  1. Accept a form submission identifier.
  2. Generate an archive payload consisting of the original form submission data as well as remediation specific documentation:
    1. Hydrate the original form submission
    2. Hydrate any original attachments that were a part of this submission
    3. Generate a JSON file with the original metadata from the submission
    4. Generate a manifest file to be used in the remediation process
  3. Upload the generated archive as a .zip file onto the configured S3 bucket
  4. Optionally return a presigned URL for accessing this file

This solution also provides a means for storing and retrieving a single .pdf copy of the originally submitted form.

The following image depicts how this solution is architected:

Error Remediation Architecture Diagram_2024-10-07_14-14-25

  • This work updates the form remediation solution to be configurable and usable by all other va.gov teams.
  • This is part 6 of a larger PR which was too large and needed broken up. It removes all code which was replaced.

Related issue(s)

Testing done

  • New logic is covered by unit tests

Requested Feedback

Any

Copy link

github-actions bot commented Oct 7, 2024

1 Error
🚫 This PR changes 1189 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 (+1/-0)

  • app/uploaders/simple_forms_api/form_remediation/uploader.rb (+48/-0)

  • app/uploaders/veteran_facing_forms_remediation_uploader.rb (+0/-43)

  • modules/simple_forms_api/app/services/simple_forms_api/form_remediation/jobs/archive_batch_processing_job.rb (+67/-0)

  • modules/simple_forms_api/app/services/simple_forms_api/form_remediation/s3_client.rb (+65/-0)

  • modules/simple_forms_api/app/services/simple_forms_api/form_remediation/submission_archive.rb (+106/-0)

  • modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archive_builder.rb (+0/-109)

  • modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archive_handler.rb (+0/-62)

  • modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archiver.rb (+0/-97)

  • modules/simple_forms_api/app/services/simple_forms_api/s3/submission_builder.rb (+0/-88)

  • modules/simple_forms_api/app/services/simple_forms_api/s3/utils.rb (+0/-33)

  • modules/simple_forms_api/lib/tasks/archive_forms_by_uuid.rake (+9/-8)

  • modules/simple_forms_api/spec/services/form_remediation/jobs/archive_batch_processing_job_spec.rb (+52/-0)

  • modules/simple_forms_api/spec/services/form_remediation/s3_client_spec.rb (+81/-0)

  • modules/simple_forms_api/spec/services/{s3/submission_archive_builder_spec.rb => form_remediation/submission_archive_spec.rb} (+27/-22)

  • modules/simple_forms_api/spec/services/s3/submission_archive_handler_spec.rb (+0/-43)

  • modules/simple_forms_api/spec/services/s3/submission_archiver_spec.rb (+0/-137)

  • modules/simple_forms_api/spec/services/s3/submission_builder_spec.rb (+0/-73)

  • spec/factories/persistent_attachments.rb (+18/-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 jap/simple-forms/remediation-config-5/main/main October 7, 2024 19:25 Inactive
@pennja pennja marked this pull request as draft October 7, 2024 20:48
@pennja pennja changed the title [SIMPLE_FORMS] feat: form remediation solution streamlining, test coverage, and documentation - PART 5 [SIMPLE_FORMS] feat: form remediation solution streamlining, test coverage, and documentation - PART 6 Oct 9, 2024
@va-vsp-bot
Copy link
Collaborator

Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file: app/uploaders/veteran_facing_forms_remediation_uploader.rb

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.

3 participants