ministryofjustice / modernisation-platform

A place for the core work of the Modernisation Platform • This repository is defined and managed in Terraform
https://user-guide.modernisation-platform.service.justice.gov.uk
MIT License
680 stars 290 forks source link

🐛 Failing Run Go Unit Tests #6387

Closed ASTRobinson closed 6 months ago

ASTRobinson commented 6 months ago

Expected Behavior

Run Go Unit Tests run and complete successfully

Example here: https://github.com/ministryofjustice/modernisation-platform-github-oidc-role/actions/runs/8108945787

Actual Behavior

Run Go Unit Tests is failing with 'ParameterNotFound' error.

Example here: https://github.com/ministryofjustice/modernisation-platform-github-oidc-role/actions/runs/8142321400

Steps to Reproduce the Problem

Create a new PR on the modernisation-platform-github-oidc-role repo.

also spotted the same error on following repositories: modernisation-platform-terraform-s3-bucket-replication-role modernisation-platform-terraform-pagerduty-integration

dms1981 commented 6 months ago

Having taken a quick look, it appears that the SSM parameter is missing from the account and that this bug isn't a problem related to the unit-test code in this repository. I'll do some git archaeology in https://github.com/ministryofjustice/modernisation-platform/tree/main/terraform/environments/testing and see what I can find.

dms1981 commented 6 months ago

By re-running the member-bootstrap code against testing-test I recreated the missing parameter.

I could see that it was deleted in this CloudTrail Event in the testing-test account: https://eu-west-2.console.aws.amazon.com/cloudtrailv2/home?region=eu-west-2#/events/d685c8b6-cef8-4ac9-86f3-b2a2736b2b02 It looks like it was removed by a GitHub action in the modernisation-platform-environments repository - aws-nuke. It would have been recreated by our scheduled baseline job but I think we just got caught out here by the order of operations.