Skip to content

Remove all legacy infrastructure for report - #1606

Merged
jacobwinch merged 1 commit into
mainfrom
jw-remove-legacy-infra
Jan 8, 2026
Merged

Remove all legacy infrastructure for report#1606
jacobwinch merged 1 commit into
mainfrom
jw-remove-legacy-infra

Conversation

@jacobwinch

@jacobwinch jacobwinch commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

What does this change?

This PR completes the GuCDK migration of report's compute infrastructure.

It is a follow up to these related PRs (#1589, #1591, #1592, #1593).

How to test

I've tested the deployment steps listed below in CODE to confirm that it works as expected (see successful Riff-Raff deployment of this branch).

I've confirmed that the API continues working as expected after the legacy infrastructure has been removed.

How can we measure success?

We'll have removed legacy infrastucture, which completes the migration and reduces AWS costs (we have been paying for 2 sets of infrastructure since #1589 was deployed).

Have we considered potential risks?

Once this PR is merged rolling back the GuCDK migration is no longer a realistic option and we are committed to fixing forwards. Consequently I think we should wait a couple of days after the deployment of #1593 (this went out on Monday 5th January) before merging this change.

Deployment steps

  • Pause CD (PROD only)
  • Merge PR
  • Manually edit the App tag on the old ASG (in order to bypass a Riff-Raff pre-flight check)
  • Deploy main using Riff-Raff's Dangerous mode (in order to delete some protected resource types - a load balancer and a Route53 record). Deployment log.
  • Re-enable CD (PROD only)

Comment thread cdk/lib/report.ts
domainName:
| 'report.notifications.guardianapis.com'
| 'report.notifications.code.dev-guardianapis.com';
// This maps to the DnsRecord resource in Route53; we can remove this complexity as part of the DNS switchover

@jacobwinch jacobwinch Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This has been redundant since #1593; I should've really tidied it up in that PR.

Comment thread report/conf/report.yaml
DomainName:
Type: String
Description: The domain name of the ELB, should contain the trailing dot stuff.zone.example.com.
Resources:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In this case I think we can delete this whole file. There are 8 resources:

  1. DnsRecord (AWS::Route53::RecordSet) - this is no longer needed as the DNS is now all managed in NS1 via a GuCname (see Start managing report's NS1 CNAME via GuCDK #1591 for more details).
  2. InstanceSecurityGroup (AWS::EC2::SecurityGroup) - the pattern replaces this.
  3. LoadBalancerToPrivateASG (AWS::ElasticLoadBalancing::LoadBalancer) - the pattern replaces this with an ALB (v2 load balancer).
  4. LoadBalancerSecurityGroup (AWS::EC2::SecurityGroup) - the pattern replaces this.
  5. NotificationsReportInstanceProfile (AWS::IAM::InstanceProfile) - the pattern replaces this.
  6. NotificationsReportRole (AWS::IAM::Role) - the pattern replaces this.
  7. PrivateReportAutoscalingGroup (AWS::AutoScaling::AutoScalingGroup) - the pattern replaces this.
  8. ReportLaunchConfig (AWS::AutoScaling::LaunchConfiguration) - the pattern replaces this with a launch template.

And the stateful DynamoDB tables are defined in a separate file (and are therefore unaffected by deleting this one).

@jacobwinch jacobwinch added the feature Departmental tracking: work on a new feature label Jan 6, 2026
@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

@jacobwinch
jacobwinch force-pushed the jw-remove-legacy-infra branch from df90a53 to ebdc990 Compare January 7, 2026 14:18
@jacobwinch
jacobwinch changed the base branch from main to jw-decommission January 7, 2026 14:18
@jacobwinch
jacobwinch changed the base branch from jw-decommission to main January 7, 2026 14:24
@jacobwinch
jacobwinch force-pushed the jw-remove-legacy-infra branch from ebdc990 to e191aad Compare January 7, 2026 14:26
@jacobwinch
jacobwinch marked this pull request as ready for review January 7, 2026 14:54
@jacobwinch
jacobwinch requested a review from a team as a code owner January 7, 2026 14:54
@jacobwinch
jacobwinch merged commit f065839 into main Jan 8, 2026
8 checks passed
@jacobwinch
jacobwinch deleted the jw-remove-legacy-infra branch January 8, 2026 08:31
@jacobwinch

jacobwinch commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

The notifications page in Ophan still looks correct; this confirms that the legacy infrastructure really was redundant.

  • Re-enable CD (PROD only)

Just confirming that this has been re-enabled now:

image

akash1810 added a commit that referenced this pull request Jan 13, 2026
The `VpcId` parameter was renamed to `GuCdkVpcId` to avoid conflicts with the YAML template.
The YAML template has been removed in #1606,
so the rename is no longer needed.
akash1810 added a commit that referenced this pull request Jan 13, 2026
The `VpcId` parameter was renamed to `GuCdkVpcId` to avoid conflicts with the YAML template.
The YAML template has been removed in #1606,
so the rename is no longer needed.
akash1810 added a commit that referenced this pull request Jan 13, 2026
The `VpcId` parameter was renamed to `GuCdkVpcId` to avoid conflicts with the YAML template.
The YAML template has been removed in #1606,
so the rename is no longer needed.
akash1810 added a commit that referenced this pull request Jan 14, 2026
The `VpcId` parameter was renamed to `GuCdkVpcId` to avoid conflicts with the YAML template.
The YAML template has been removed in #1606,
so the rename is no longer needed.
akash1810 added a commit that referenced this pull request Jan 15, 2026
The `VpcId` parameter was renamed to `GuCdkVpcId` to avoid conflicts with the YAML template.
The YAML template has been removed in #1606,
so the rename is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants