isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

Add details to drop Quad-A records in email #764

Closed harishv7 closed 1 year ago

harishv7 commented 1 year ago

Problem

Currently, during site launch, if there exists AAAA records for a domain, it must be dropped. There has been some instances when this was not dropped and it conflicts with our process.

Closes IS-109

Solution

We perform a dig command to check for AAAA records associated with a domain and add these records into the email we send to Ops to remind them that these records must be dropped.

Breaking Changes

Tests

Deploy Notes

New dependencies:

Test plan

Step 0: Set your export MOCK_AMPLIFY_DOMAIN_ASSOCIATION_CALLS="true" Step 1. Run this from server.js to trigger a fake formsg response, with appropriate values for the emails and repos you have setup

const formResponses = [ { submissionId: "", requesterEmail: "REQUESTER@open.gov.sg", repoName: "test-amplify", primaryDomain: "google.com", redirectionDomain: "www.google.com", agencyEmail: "AGENCY@open.gov.sg", }, { submissionId: "", requesterEmail: "REQUESTER@open.gov.sg", repoName: "test-site", primaryDomain: "yahoo.com", redirectionDomain: "www.isomer.gov.sg", agencyEmail: "AGENCY@open.gov.sg", }, ]

formsgSiteLaunchRouter.handleSiteLaunchResults(formResponses, "test")

Step 2: Refer to terminal output for resulting email content

Example of output (previewed on VSCode): Screenshot 2023-05-10 at 8 15 05 PM