Skip to content

Move confirmation email reference generation to job runtime#1918

Open
theseanything wants to merge 1 commit intomainfrom
theseanything/generate-notify-response-id-in-job
Open

Move confirmation email reference generation to job runtime#1918
theseanything wants to merge 1 commit intomainfrom
theseanything/generate-notify-response-id-in-job

Conversation

@theseanything
Copy link
Contributor

Move confirmation email reference creation from EmailConfirmationInput request-time handling into SendConfirmationEmailJob, so the Notify reference is generated when the job executes only when we need it.

Removes a lot of unnecessary code and makes EmailConfirmationInput model simpler.

We don't need to log the notify_response_id at request time, as request will not fail due a notify error - so little use to correlate them.

@theseanything theseanything force-pushed the theseanything/generate-notify-response-id-in-job branch 2 times, most recently from eb90806 to 0c9211b Compare February 26, 2026 15:17
@theseanything theseanything requested a review from a team February 26, 2026 15:25
@theseanything theseanything force-pushed the theseanything/generate-notify-response-id-in-job branch 3 times, most recently from d779cd7 to 4864c05 Compare February 26, 2026 15:35
Move confirmation email reference creation from EmailConfirmationInput
request-time handling into SendConfirmationEmailJob, so the Notify
reference is generated when the job executes only when we need it.
@theseanything theseanything force-pushed the theseanything/generate-notify-response-id-in-job branch from 4864c05 to 009c374 Compare March 5, 2026 13:56
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

🎉 A review copy of this PR has been deployed! It is made of up two components

  1. A review copy of forms-runner
  2. A production copy of forms-admin

Important

Not all of the functionality of forms-runner is present in review apps.
Functionality such as sending emails, file upload, and S3 submission types are
deliberately disabled for the sake of simplifying review apps.

You should use the full dev environment to test the functionality which is disabled here.

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

Comment on lines -59 to -60
it "contains a hidden notify reference for the confirmation email" do
expect(rendered).to have_field("confirmation-email-reference", type: "hidden", with: email_confirmation_input.confirmation_email_reference)
Copy link
Contributor

Choose a reason for hiding this comment

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

We use this hidden reference in the end-to-end tests: https://github.com/alphagov/forms-e2e-tests/blob/5af8577d3291d7490634340bcd616badfda10e72/spec/support/feature_helpers.rb#L385

I think without this we'll either need to find another way of knowing which reference to look for in the Notify API or another way of checking the Notify content

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah good catch! I'll take a look at decoupling the e2e tests

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.

2 participants