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

PBP 95481 ZSF VA Email Notification #19022

Merged
merged 33 commits into from
Nov 1, 2024

Conversation

wayne-weibel
Copy link
Contributor

@wayne-weibel wayne-weibel commented Oct 22, 2024

Summary

add general functionality to send email notification for a SavedClaim

Related issue(s)

ZSF | general claim email notification functionality
https://github.com/department-of-veterans-affairs/vsp-infra-application-manifests/pull/3181
https://github.com/department-of-veterans-affairs/vsp-infra-application-manifests/pull/3185

Testing done

  • New code is covered by unit tests
  • locally in console:
3.3.3 :001 > require 'va_notify/notification_email/saved_claim'
3.3.3 :002 > c = Pensions::SavedClaim.find(4)
3.3.3 :003 > vne = VANotify::NotificationEmail::SavedClaim.new(c)
3.3.3 :004 > vne.deliver(:confirmation)

Screenshots

image

What areas of the site does it impact?

pension and burial at the moment. any other saved claim form can use this class by extending or directly

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
  • I added a screenshot of the developed feature

Requested Feedback

Should the rescue also reraise the exception? My thinking in not doing so is that the send of the email should not be a requirement to continue the calling process, and there is the monitoring of success/failure (at least for calling the EmailJob.perform)

@wayne-weibel wayne-weibel added burial-benefits Label used for Pull Requests that impact Burial claims (530) pension-benefits Used for PRs that impact Pensions zero-silent-failures labels Oct 22, 2024
@va-vfs-bot va-vfs-bot temporarily deployed to pbp-95481-va-email-notification/main/main October 22, 2024 21:01 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to pbp-95481-va-email-notification/main/main October 22, 2024 21:31 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to pbp-95481-va-email-notification/main/main October 23, 2024 15:52 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to pbp-95481-va-email-notification/main/main October 23, 2024 16:11 Inactive
Copy link

github-actions bot commented Oct 23, 2024

1 Warning
⚠️ This PR changes 398 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

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

  • app/models/saved_claim.rb (+16/-0)

  • app/models/saved_claim/burial.rb (+8/-21)

  • app/sidekiq/lighthouse/submit_benefits_intake_claim.rb (+2/-0)

  • config/settings.yml (+20/-2)

  • lib/va_notify/notification_email.rb (+40/-0)

  • lib/va_notify/notification_email/burial.rb (+25/-0)

  • lib/va_notify/notification_email/saved_claim.rb (+84/-0)

  • modules/pensions/app/models/pensions/saved_claim.rb (+2/-27)

  • modules/pensions/app/sidekiq/pensions/pension_benefit_intake_job.rb (+2/-1)

  • modules/pensions/lib/pensions/notification_email.rb (+14/-0)

  • modules/pensions/spec/models/pensions/saved_claim_spec.rb (+5/-15)

  • modules/pensions/spec/sidekiq/pensions/pension_benefit_intake_job_spec.rb (+6/-1)

  • spec/factories/saved_claim.rb (+28/-0)

  • spec/lib/va_notify/notification_email/saved_claim_spec.rb (+71/-0)

  • spec/sidekiq/lighthouse/submit_benefits_intake_claim_spec.rb (+4/-1)

    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 pbp-95481-va-email-notification/main/main October 24, 2024 14:28 Inactive
@rmtolmach
Copy link
Contributor

There was a seemingly-unrelated test failure. I'm re-running them for you.

@va-vfs-bot va-vfs-bot temporarily deployed to pbp-95481-va-email-notification/main/main October 29, 2024 16:05 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to pbp-95481-va-email-notification/main/main October 29, 2024 16:45 Inactive
@rmtolmach
Copy link
Contributor

Maybe it is related. It keeps failing on your branch and I don't see it failing on master https://github.com/department-of-veterans-affairs/vets-api/commits/master/
Here's one. but see the test output for more failures.

  1) SavedClaim::EducationBenefits::VA10203#after_submit calls get_gi_bill_status on the service
     Failure/Error: Settings.vanotify.services.va_gov.template_id.form21_10203_confirmation_email,

     NoMethodError:
       undefined method `template_id' for nil
     # ./app/models/saved_claim/education_benefits/va_10203.rb:121:in `send_confirmation_email'
     # ./app/models/saved_claim/education_benefits/va_10203.rb:22:in `after_submit'
     # ./spec/models/saved_claim/education_benefits/va10203_spec.rb:31:in `block (3 levels) in <top (required)>'
     # /usr/local/bundle/cache/ruby/3.3.0/gems/webmock-3.24.0/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
     # /usr/local/bundle/cache/ruby/3.3.0/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:124:in `block in run'
     # /usr/local/bundle/cache/ruby/3.3.0/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `run'
     # /usr/local/bundle/cache/ruby/3.3.0/gems/rspec-retry-0.6.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /usr/local/bundle/cache/ruby/3.3.0/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:37:in `block (2 levels) in setup'

@wayne-weibel
Copy link
Contributor Author

wayne-weibel commented Oct 29, 2024

Maybe it is related. It keeps failing on your branch and I don't see it failing on master https://github.com/department-of-veterans-affairs/vets-api/commits/master/ Here's one. but see the test output for more failures.

that was a different one from what i was seeing before - i merged master again and will be checking more closely if it fails

@va-vfs-bot va-vfs-bot temporarily deployed to pbp-95481-va-email-notification/main/main October 29, 2024 19:40 Inactive
@rmtolmach
Copy link
Contributor

Maybe it is related. It keeps failing on your branch and I don't see it failing on master https://github.com/department-of-veterans-affairs/vets-api/commits/master/ Here's one. but see the test output for more failures.

that was a different one from what i was seeing before - i merged master again and will be checking more closely if it fails

👍 And I re-ran the test suite twice, so it had three passing runs.

@wayne-weibel Can you get a teammate to review?

Copy link
Contributor

@TaiWilkin TaiWilkin left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link

Backend-review-group approval confirmed.

@wayne-weibel wayne-weibel merged commit b97a189 into master Nov 1, 2024
23 of 24 checks passed
@wayne-weibel wayne-weibel deleted the pbp-95481-va-email-notification branch November 1, 2024 14:26
rmtolmach added a commit that referenced this pull request Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
burial-benefits Label used for Pull Requests that impact Burial claims (530) pension-benefits Used for PRs that impact Pensions require-backend-approval test-passing zero-silent-failures
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants