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

[10-10EZ] Add VANotify Callbacks to Failure email #19964

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

coope93
Copy link
Contributor

@coope93 coope93 commented Dec 19, 2024

Summary

  • This work is behind a feature toggle (flipper): YES
  • Added VANotify callbacks to the 10-10EZ Submission Failure email. The callbacks increment relevant statsD metrics and logs for success/failure, and we will be adding monitors in datadog for these metrics.
  • 10-10 Health Apps
  • Behind new hca_zero_silent_failures toggle

Related issue(s)

Testing done

  • New code is covered by unit tests
  • We will validate that the relevant vanotify statsD metrics are incremented with our email tags in staging

What areas of the site does it impact?

10-10EZ

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

@@ -419,15 +422,15 @@
expect do
described_class.new(form: { mothersMaidenName: 'm' }.to_json).process!
end.to raise_error(Common::Exceptions::ValidationErrors)
end.to trigger_statsd_increment('api.1010ez.validation_error_short_form')
end.to trigger_statsd_increment("#{statsd_key_prefix}.validation_error_short_form")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced these with a variable to DRY it up a bit. It's a little different than others since the prefix comes from the service and not the class under test, but I still like it better than hardcoding it.

@@ -542,6 +545,7 @@ def self.expect_job_submission(job)

before do
allow(VANotify::EmailJob).to receive(:perform_async)
allow(Flipper).to receive(:enabled?).with(:hca_zero_silent_failures).and_return(false)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have to add this since toggles are on be default in test environments.

Copy link
Contributor

@JoshingYou1 JoshingYou1 left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work Brandon! 😃

@coope93 coope93 merged commit 2913119 into master Dec 20, 2024
72 of 73 checks passed
@coope93 coope93 deleted the 93247-va-notify-callbacks-1010-ez branch December 20, 2024 13:56
derekhouck pushed a commit that referenced this pull request Dec 31, 2024
* add callback metadata to send failure email

* add hca_zero_silent_failures flipper toggle and use it for metadata
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.

4 participants