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

#1770 Send All Email Statuses to VA Profile #1889

Merged
merged 21 commits into from
Aug 1, 2024

Conversation

EvanParish
Copy link

@EvanParish EvanParish commented Jul 26, 2024

Description

This is the work to send all email statuses to VA Profile. It's creating a new callback to send the statuses to VA Profile specifically via the endpoint they've set up to receive them.

This spins off a new celery task, which is kicked of alongside our usual callbacks.

New functions added:

  • check_and_queue_va_profile_email_status_callback
  • send_email_status_to_va_profile (celery task)
  • send_va_profile_email_status

issue #1770

Type of change

Please check the relevant option(s).

  • Bug fix (non-breaking change which fixes an issue)
  • Hotfix (quick fix for an urgent bug or issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation changes only

How Has This Been Tested?

  • Unit tests added
  • Deployed to Dev
  • Logs verify the feature is working as expected

Logs showing a 200 response from VA Profile in Dev.

2024-08-01T16:00:21 delivery delivery INFO no-request-id "VA Profile response when receiving status of notification 099b34c3-cf4b-46c1-9e1f-4f49866e3f80 | status code: 200 | json: {'status': 'COMPLETED_NOOP'}"

Checklist

  • I have assigned myself to this PR
  • PR has an appropriate title: #9999 - What the thing does
  • PR has a detailed description, including links to specific documentation
  • I have added the appropriate labels to the PR.
  • I did not remove any parts of the template, such as checkboxes even if they are not used
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to any documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works. Testing guidelines
  • I have ensured the latest master is merged into my branch and all checks are green prior to review
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • The ticket is now moved into the DEV test column
  • I have added a bullet for this work to the Engineering Key Wins slide for review

@EvanParish EvanParish self-assigned this Jul 26, 2024
@EvanParish EvanParish linked an issue Jul 26, 2024 that may be closed by this pull request
15 tasks
@EvanParish EvanParish changed the title #1770 send va profile email status #1770 Send All Email Statuses to VA Profile Jul 26, 2024
Copy link
Author

Choose a reason for hiding this comment

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

I added a couple links to our PR template for easier referencing of our docs since we were talking about how we might best follow our guidelines in the last process improvement meeting.

Choose a reason for hiding this comment

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

Thank you for adding the links

Copy link

@MackHalliday MackHalliday left a comment

Choose a reason for hiding this comment

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

Approved - I have reviewed the new code against the AC, our testing guidelines, and our style guidelines

retry_backoff=True,
retry_backoff_max=3600,
)
def send_email_status_to_va_profile(notification_data: dict) -> None:

Choose a reason for hiding this comment

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

Nit and not a blocker:
Should send_va_profile_email_status and send_email_status_to_va_profile all be in one method.
Right now it appears send_email_status_to_va_profile only responsibility is to call send_va_profile_email_status and raise an exception if it fails.

Is it currently setup this way so AutoRetry functions properly?

Copy link
Author

Choose a reason for hiding this comment

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

send_email_status_to_va_profile defines the celery task. I was originally collecting the info from the notification there too, but that had to get moved out to the calling function because info passed to a celery task has to be json serializable. I also don't want to define a celery task within the VAProfileClient class itself either. So this is what we are left with. Hopefully that makes sense.

Choose a reason for hiding this comment

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

Sounds good to me!

@EvanParish EvanParish merged commit 0c4d82f into master Aug 1, 2024
13 checks passed
@EvanParish EvanParish deleted the 1770-send-va-profile-email-status branch August 1, 2024 19:36
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