Skip to content

Vanotify migrate simple_forms_api to use v2 email job#27787

Merged
nathanbwright merged 5 commits intomasterfrom
vanotify-2045-migrate-job
Apr 21, 2026
Merged

Vanotify migrate simple_forms_api to use v2 email job#27787
nathanbwright merged 5 commits intomasterfrom
vanotify-2045-migrate-job

Conversation

@nathanbwright
Copy link
Copy Markdown
Contributor

@nathanbwright nathanbwright commented Apr 16, 2026

Keep your PR as a Draft until it's ready for Platform review. A PR is ready for Platform review when it has a teammate approval and tests, linting, and settings checks pass CI. See these tips on how to avoid common delays in getting your PR merged.

Summary

  • *This work is behind a feature toggle (flipper): YES
  • (Summarize the changes that have been made to the platform) Migrates to use VANotify::V2::QueueEmailJob. Adds VANotify::V2::QueueEmailJob.enqueue_at.
  • (If bug, how to reproduce)
  • (What is the solution, why is this the solution?)
  • (Which team do you work for, does your team own the maintenance of this component?)
  • (If introducing a flipper, what is the success criteria being targeted?)

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?

…_forms_api/notification/email.rb to use v2 email job
…_forms_api/notification/form_upload_email.rb to use v2 email job
MarchandMD
MarchandMD previously approved these changes Apr 20, 2026
Copy link
Copy Markdown
Contributor

@MarchandMD MarchandMD left a comment

Choose a reason for hiding this comment

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

👍

@nathanbwright nathanbwright marked this pull request as ready for review April 20, 2026 16:01
@nathanbwright nathanbwright requested review from a team as code owners April 20, 2026 16:01
dominicpadula1
dominicpadula1 previously approved these changes Apr 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates Simple Forms API notification email delivery to the VANotify V2 queuing job, adding support for scheduled sends via a new VANotify::V2::QueueEmailJob.enqueue_at entrypoint and gating the behavior behind new Flipper toggles.

Changes:

  • Added VANotify::V2::QueueEmailJob.enqueue_at and unit tests for it.
  • Updated SimpleFormsApi notification services to use V2 (immediate + scheduled) when the new Flipper flags are enabled.
  • Added new feature toggles for SimpleFormsApi V2 email behavior in config/features.yml.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
modules/va_notify/app/sidekiq/va_notify/v2/queue_email_job.rb Adds enqueue_at helper to schedule V2 queued emails.
modules/va_notify/spec/sidekiq/v2/queue_email_job_spec.rb Adds specs covering enqueue_at behavior and validation paths.
modules/simple_forms_api/app/services/simple_forms_api/notification/form_upload_email.rb Switches scanned form upload notifications to V2 when flipper is enabled (now + scheduled).
modules/simple_forms_api/app/services/simple_forms_api/notification/email.rb Switches standard SimpleFormsApi notifications to V2 when flipper is enabled (now + scheduled for form-data path).
modules/simple_forms_api/spec/services/notification/form_upload_email_spec.rb Adds coverage for V1 vs V2 behavior under the upload-email flipper (now + scheduled).
modules/simple_forms_api/spec/services/notification/email_spec.rb Adds coverage for V1 vs V2 behavior under the email flipper (now + scheduled).
modules/simple_forms_api/spec/requests/simple_forms_api/v1/simple_forms_spec.rb Stubs new flipper off to keep request spec behavior on V1 by default.
config/features.yml Adds new Flipper entries for SimpleFormsApi V2 email migrations.

Comment thread config/features.yml Outdated
Comment thread modules/simple_forms_api/spec/services/notification/email_spec.rb Outdated
@rmtolmach
Copy link
Copy Markdown
Contributor

@nathanbwright a few small questions ☝️

Copy link
Copy Markdown
Contributor

@rmtolmach rmtolmach left a comment

Choose a reason for hiding this comment

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

only small changes since your last team approval, so I'll approve ✅

@nathanbwright nathanbwright merged commit 2086c87 into master Apr 21, 2026
42 of 46 checks passed
@nathanbwright nathanbwright deleted the vanotify-2045-migrate-job branch April 21, 2026 17:45
balexandr pushed a commit that referenced this pull request Apr 21, 2026
* Migrate perform_async in modules/simple_forms_api/app/services/simple_forms_api/notification/email.rb to use v2 email job

* Migrate perform_async in modules/simple_forms_api/app/services/simple_forms_api/notification/form_upload_email.rb to use v2 email job

* Create enqueue_at method and migrate simple_forms to use it with v2 email job

* Clarify flipper description

* Scope flipper stubbing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants